Skip to Content

Assert(pInstrument) when using MIDI keyboard in

2 replies [Last post]
FueUku
Offline
Joined: 04/17/2010

Whenever I try to input using the MIDI keyboard, I get an assertion failure on the expression "pInstrument" in src/Note.cpp line 99. I'm running from 20060309 windows installer (0.9.4-svn) on WinXP home. My Midi interface is an M-Audio USB Uno MIDI-to-USB device.

To reroduce:
Bring up Hydrogen, choose Tools=>Preferences=>MIDI system
Midi driver: PortMidi (default)
Input: change from None to USB Uno Midi In
Channel: 1 (also fails when set to ALL)
Ignore Note off: unchecked

Hit Okay, and then hit any key on the MIDI keyboard (an old Casio, but it seems to work fine with a few other programs).

Any suggestions for this?

---------------------------------------------------------------------
HYDROGEN.LOG
Start logger(I) Preferences [Preferences] INIT
(I) Preferences [loadPreferences] Loading preferences file (GLOBAL) [C:/Program Files/Hydrogen/data/hydrogen.default.conf]
(I) Preferences [loadPreferences] Loading preferences file (USER) [C:/Documents and Settings/Carlos/.hydrogen/hydrogen.conf]
(W) [static bool H2Core::LocalFileMng::readXmlBool(TiXmlNode*, const std::string&, bool, bool)] 'useMidiTransport' node not found
(I) [int qMain(int, char**)] Warning: no locale found: C:/Program Files/Hydrogen/data/i18n/hydrogen.en_US
(I) [int qMain(int, char**)] Warning: error loading locale: C:/Program Files/Hydrogen/data/i18n/hydrogen.en_US.qm
(I) SongReader [readSong] C:/Program Files/Hydrogen/data/DefaultSong.h2song
(I) Song [Song] INIT "Untitled Song"
(I) [H2Core::Hydrogen::Hydrogen()] [Hydrogen]
(I) [void H2Core::audioEngine_init()] *** Hydrogen audio engine init ***
(I) AudioEngine [AudioEngine] INIT
(I) Effects [getPluginList] PATHS: 4
(I) Effects [getPluginList] *** [getPluginList] reading directory: /usr/lib/ladspa
(I) Effects [getPluginList] Directory /usr/lib/ladspa not found
(I) Effects [getPluginList] *** [getPluginList] reading directory: /usr/local/lib/ladspa
(I) Effects [getPluginList] Directory /usr/local/lib/ladspa not found
(I) Effects [getPluginList] *** [getPluginList] reading directory: /lib/hydrogen/plugins
(I) Effects [getPluginList] Directory /lib/hydrogen/plugins not found
(I) Effects [getPluginList] *** [getPluginList] reading directory: C:/Program Files/Hydrogen/plugins
(I) Effects [getPluginList] Loaded 6 LADSPA plugins
(I) Sequencer [Sequencer] INIT
(I) [void H2Core::audioEngine_startAudioDrivers()] [audioEngine_startAudioDrivers]
(I) [H2Core::AudioOutput* H2Core::createDriver(const std::string&)] Driver: "Jack"
(I) [H2Core::AudioOutput* H2Core::createDriver(const std::string&)] Driver: "Alsa"
(I) [H2Core::AudioOutput* H2Core::createDriver(const std::string&)] Driver: "CoreAudio"
(I) [H2Core::AudioOutput* H2Core::createDriver(const std::string&)] Creating CoreAudioDriver
(I) [H2Core::AudioOutput* H2Core::createDriver(const std::string&)] Driver: "PortAudio"
(I) PortAudioDriver [PortAudioDriver] INIT
(I) PortMidiDriver [open] [open]
(I) PortMidiDriver [open] Midi input device not found.
(I) Sampler [Sampler] INIT
(I) PortAudioDriver [connect] [connect]
(I) [void H2Core::audioEngine_setSong(H2Core::Song*)] set song: Untitled Song
(I) [int H2Core::audioEngine_process(uint32_t, void*)] Buffer size changed. Old size = 0, new size = 1024
(I) InstrumentRack [InstrumentRack] INIT
(I) InstrumentEditorPanel [InstrumentEditorPanel] INIT
(E) LocalFileMng [loadDrumkit] Load Instrument: Data file C:/Program Files/Hydrogen/data/drumkits/.svn/drumkit.xml not found.
(I) OldDrumkitManager [OldDrumkitManager] INIT
(I) OldDrumkitManager [updateDrumkitList] [updateDrumkitList]
(E) LocalFileMng [loadDrumkit] Load Instrument: Data file C:/Program Files/Hydrogen/data/drumkits/.svn/drumkit.xml not found.
(I) HydrogenApp [showInfoSplash] [showInfoSplash] Selected news: news-051108.html
(W) MainForm [latestVersionDone]

*** You're using a development version of Hydrogen, please help us reporting bugs in the hydrogen-devel mailing list. Thank you!

(I) Preferences [loadPreferences] Loading preferences file (USER) [C:/Documents and Settings/Carlos/.hydrogen/hydrogen.conf]
(W) [static bool H2Core::LocalFileMng::readXmlBool(TiXmlNode*, const std::string&, bool, bool)] 'useMidiTransport' node not found
(I) PortMidiDriver [getOutputPortList] USB Uno MIDI In
(I) PreferencesDialog [on_okBtn_clicked] [okBtnClicked] SINGLE PANED interface selected
(I) Preferences [savePreferences] Saving preferences file: C:/Documents and Settings/Carlos/.hydrogen/hydrogen.conf
(I) [void H2Core::audioEngine_stopAudioDrivers()] [audioEngine_stopAudioDrivers]
(I) PortMidiDriver [close] [close]
(I) PortAudioDriver [~PortAudioDriver] DESTROY
(I) [void H2Core::audioEngine_startAudioDrivers()] [audioEngine_startAudioDrivers]
(I) [H2Core::AudioOutput* H2Core::createDriver(const std::string&)] Driver: "Jack"
(I) [H2Core::AudioOutput* H2Core::createDriver(const std::string&)] Driver: "Alsa"
(I) [H2Core::AudioOutput* H2Core::createDriver(const std::string&)] Driver: "CoreAudio"
(I) [H2Core::AudioOutput* H2Core::createDriver(const std::string&)] Creating CoreAudioDriver
(I) [H2Core::AudioOutput* H2Core::createDriver(const std::string&)] Driver: "PortAudio"
(I) PortAudioDriver [PortAudioDriver] INIT
(I) PortMidiDriver [open] [open]
(I) PortMidiDriver [open] Device: MMSystem USB Uno MIDI In
(I) PortAudioDriver [connect] [connect]
(I) [void* H2Core::PortMidiDriver_thread(void*)] PortMidiDriver_thread starting
(I) PortMidiDriver [handleNoteOnMessage] handleNoteOnMessage
(W) [void H2Core::Hydrogen::addRealtimeNote(int, float, float, float, float, bool)] not fully implemented
(I) PortMidiDriver [handleNoteOnMessage] handleNoteOnMessage
(I) PortMidiDriver [handleNoteOffMessage] handleNoteOffMessage
(E) InstrumentList [get] pos > list.size(). pos = 28

FueUku
Offline
Joined: 04/17/2010

I also noticed that the Preferences panel _always_ forgets the Input device. If I close the prefernces panel and reopen it, the input device resets to "None". I don' tknow if it is related, but is is defnitely a bug.

hink3167
Offline
Joined: 04/17/2010

I've been using H2 for a little while now and I had the same problem when I tryed to use my MIDI to USB interface.
But using the latest build, check the ignore note off box and see if that works - it did for me.
Since it is a drum sequencer the duration doesn't matter it's the timing that is needed.

don't know about the Preferences panel forgetting you Input device.