Mercurial > hg > svapp
comparison audioio/AudioGenerator.cpp @ 61:215b8b1b0308
* Add Erase tool and mode
* Add icons for Normalize buttons in property boxes, and for Show Peaks
* Add support for velocity in notes -- not yet reflected in display or
editable in the note edit dialog, but they are imported from MIDI,
played, and exported
* Begin work on making pastes align pasted times (subtler than I thought)
author | Chris Cannam |
---|---|
date | Fri, 23 Nov 2007 16:48:23 +0000 |
parents | 3c5756fb6a68 |
children | 448ff6e34b99 |
comparison
equal
deleted
inserted
replaced
60:7b71da2d0631 | 61:215b8b1b0308 |
---|---|
733 onEv.data.note.note = Pitch::getPitchForFrequency(pli->value); | 733 onEv.data.note.note = Pitch::getPitchForFrequency(pli->value); |
734 } else { | 734 } else { |
735 onEv.data.note.note = lrintf(pli->value); | 735 onEv.data.note.note = lrintf(pli->value); |
736 } | 736 } |
737 | 737 |
738 if (pli->level > 0.f && pli->level <= 1.f) { | |
739 onEv.data.note.velocity = lrintf(pli->level * 127); | |
740 } else { | |
741 onEv.data.note.velocity = 100; | |
742 } | |
743 | |
738 plugin->sendEvent(eventTime, &onEv); | 744 plugin->sendEvent(eventTime, &onEv); |
739 | 745 |
740 #ifdef DEBUG_AUDIO_GENERATOR | 746 #ifdef DEBUG_AUDIO_GENERATOR |
741 std::cout << "mixModel [note]: point at frame " << pliFrame << ", block start " << (startFrame + i * m_pluginBlockSize) << ", resulting time " << eventTime << std::endl; | 747 std::cout << "mixModel [note]: point at frame " << pliFrame << ", block start " << (startFrame + i * m_pluginBlockSize) << ", resulting time " << eventTime << std::endl; |
742 #endif | 748 #endif |