Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is JetCreator still maintained (and/or is JETPlayer deprecated?)

My Android app requires several music tracks to be played back simultaneously and in sync (e.g. a drum track and a vocals track which play together, but which can be individually muted). Efforts with SoundPool have been fruitless -- even if I call SoundPool.play() in two sequential lines, there is always a perceptible delay introduced.

The JetPlayer class seems perfect for what I need, but it also seems like nobody is using it -- the docs were last updated four years ago, the site of the maintainers is down, and the related JetCreator tool doesn't run on modern versions of Python, wxPython (crashes with wxPython C++ assertion) with no obvious workarounds/FAQs.

Question: Is JetPlayer/JetCreator abandonware, or should I still keep fighting with getting it to run?

Corollary: If it's still in use, can anyone advise on the following wxPython errors?

  File "/usr/local/lib/wxPython-3.0.0.0/lib/python2.7/site-packages/wx-3.0-osx
  _cocoa/wx/_gdi.py", line 5317, in __init__
     _gdi_.AutoBufferedPaintDC_swiginit(self,_gdi_.new_AutoBufferedPaintDC(*args, **kwargs))
wx._core.PyAssertionError: C++ assertion "window->MacGetCGContextRef() != NULL" 
failed at /BUILD/wxPython-src-3.0.0.0/src/osx/carbon/dcclient.cpp(195) in wxPaintDCImpl(): using wxPaintDC without being in a native paint event
like image 492
mrisher Avatar asked Nov 11 '22 15:11

mrisher


1 Answers

As your question is pretty old i hope my answer still helps you or anybody else.

Install Python for JET Creator

As a read JETCreator is not supported in newer versions of python, therefore use:

  • Python Version 2.5.4 (python-2.5.4.msi)
  • wxPython 2.8 (wxPython2.8-win32-unicode-2.8.7.1-py25.exe)

follow this tutorial http://www.tutorialspoint.com/android/android_jetplayer.html for installing python and wxpython. Installing Python and JETCreator can be pretty tricky so you must be very carefull. I had to try it several times until it worked correctly.

You can then download DEMo-Data from github or anywhere else! JETCreator reads in MIDI files and produces JETfiles

In the JETCreator you can now set MUTE-flags for your tracks. You have to remeber the "dezimal-number" of the muteflag as they represent the "binary-number" of the muted tracks. You have to implement this number into your Android project.

Use your created data in eclipse:

LOAD Data

    mJet = JetPlayer.getJetPlayer();
    mJet.setEventListener(this);
    AssetFileDescriptor afd = this.getResources().openRawResourceFd(R.raw.demo);
    mJet.loadJetFile(afd);

CALL JETplayer

    mJet.clearQueue();
    mJet.queueJetSegment(0, 0, -1, 0, 0, (byte) 0);
    mJet.play();

SET MUTE flages, eg.: at on OnClickListener

    mJet.setMuteFlags(0b1110, false); //0b1110 = 14       

Relesae your JETPlayer when stopped

    mJet.release();

If there are any question, do not hesitate to ask!

PS: MIDI files do not support "human voice" and therfore vocals can not be played.

like image 54
SCI_A Avatar answered Nov 14 '22 22:11

SCI_A