Each instrument consists of multiple samples, and each note can be associated with a particular sample, or all notes (120) associated to one sample only…
It is possible through the LUA API play and stop “a note” associated with a concrete sample?Sound the note!
I have a button , with " notifier", " pressed" and " released", and a instrument: “instrument 00”. The API allows this? :
WMP_KEY_00 = vb:button {
id = 'WMP_KEY_00',
tooltip = 'play/stop note C-0',
width = 14,
height = 50,
color = { 0xFF,0xFF,0xFF },
notifier = the function of notifier
pressed = the function of play note C-0 of the selected "instrument 00" with specific volume <--???
released = the function of stop note C-0... <--???
}
The note would sound while holding down the button with the mouse and it stops when the mouse release the button.It’s possible?Is there a way to do it?
I have built a complete virtual piano for editing with the mouse. But it would be great to play the notes with the mouse, using buttons. I have been looking at “Renoise.Song.API.lua” but I can not find a command to play stop the note.Most of the related has to do with the pattern editor or the sample editor.
Please help!
Thanks!
…
Related:
Button Properties:
– Valid in the construction table only: set up a click notifier.
button.pressed
-> [function()]
– Valid in the construction table only: set up a click release notifier.
button.released
-> [function()]
– synonymous for ‘button.released’.
button.notifier
-> [function()]
– Add/remove button hit/release notifier functions.
– When a “pressed” notifier is set, the release notifier is guaranteed to be
– called as soon as the mouse is released, either over your button or anywhere
– else. When a “release” notifier is set, it is only called when the mouse
– button is pressed !and! released over your button.
button:add_pressed_notifier(function or {object, function} or {object, function})
button:add_released_notifier(function or {object, function} or {object, function})
button:remove_pressed_notifier(function or {object, function} or {object, function})
button:remove_released_notifier(function or {object, function} or {object, function})
Inventing:
renoise.song().instruments[].samples[].play ???
renoise.song().instruments[].samples[].stop ???
renoise.song().instruments[…“instrument 00”…].notes[…“C-0”…].play???Is not there something like that?
renoise.song().instruments[].notes[].stop ???
The following code is related to Keyzones?
– renoise.SampleMapping
– General remarks: Sample mappings of sliced samples are read-only: can not be
– modified. See sample_mappings[].read_only
-------- Properties
– True for sliced instruments. No sample mapping properties are allowed to
– be modified, but can be read.
renoise.song().instruments[].sample_mappings[].read_only
-> [read-only, boolean]
– Linked sample.
renoise.song().instruments[].sample_mappings[].sample
-> [renoise.Sample object]
– Mapping’s layer (triggered via Note-Ons or Note-Offs?).
renoise.song().instruments[].sample_mappings[].layer, _observable
-> [enum = renoise.Instrument.LAYER]
– Mappings velocity->volume and key->pitch options.
renoise.song().instruments[].sample_mappings[].map_ velocity_to_volume , _observable
-> [boolean]
renoise.song().instruments[].sample_mappings[].map_key_to_pitch, _observable
-> [boolean]
– Mappings base-note. Final pitch of the played sample is:
– played_note - mapping.base_note + sample.transpose + sample.finetune
renoise.song().instruments[].sample_mappings[].base_note, _observable
-> [number (0-119, c-4=48)]
– Note range the mapping is triggered for.
renoise.song().instruments[].sample_mappings[].note_range, _observable
-> [table with two numbers ( 0-119 , c-4=48)]
– Velocity range the mapping is triggered for.
renoise.song().instruments[].sample_mappings[].velocity_range, _observable
-> [table with two numbers (0-127)]