Will you post an interim release of this, please?
Also, do you have plans of doing a “Create New ReSynth Instrument & Open GUI” functionality so that one can just … start with one command
Will you post an interim release of this, please?
Also, do you have plans of doing a “Create New ReSynth Instrument & Open GUI” functionality so that one can just … start with one command
I understand the GUI / clutter issue. So here’s one other possible way of thinking about it. What if you are in the sample editor view already - could not the sliders switch whcih sample is shown. That way it wouldn’t interfere with any of the other things you detailed, which are all valid - btw.
No interim release planned, 1.0 will drop soon enough.
Create & open will be added though.
However, if you have ‘auto-select played’ enabled on the sample editor it will always default to the first sample mapped to that key (which in this case will always be oscillator 1). Thus, everytime you modified an oscillator 2 control it would display that waveform on screen but when you previewed it by playing a note it would jump back to viewing oscillator 1. Jumping around like that can be distracting so it will not be in this version. I’ll have a think to see if I can somehow get around it, but I don’t think its possible through the API at the moment.
Cool about create&open. Yeah, I tried the auto-select played but didn’t like it’s performance. I reckon there’s a cleaner way of doing it straight from the gui, without forcing the user to see it if he’s not on the sample editor. I have this feeling that it’s possible to do “selected instrument’s selected_sample” switching upon different sliders, without having to be in the sample editor itself - so it’ll be an invisible feature in pattern editor (etc) but a visible feature when auto-select played is off.
Aww I’ll have to re-paste in that keyhandler code then, I redownloaded your original version after you posted about the forthcoming updates…
btw, if I make a volume envelope to a ReSynth created instrument, it stops being loadable by ReSynth
(actually, volume_envelope and Continue NNA)
did the modifications to gui.lua every slider (for personal use) (so now every slider will switch to sample_view (middleframe), to instrument_settings_view (lower frame) and depending on osc, either sample2 or sample 3.)
so
[details=“Click to view contents”] ```
local CONTENT_SPACING = renoise.ViewBuilder.DEFAULT_CONTROL_SPACING
local DEFAULT_DIALOG_BUTTON_HEIGHT = renoise.ViewBuilder.DEFAULT_DIALOG_BUTTON_HEIGHT
local DEFAULT_DIALOG_MARGIN = renoise.ViewBuilder.DEFAULT_DIALOG_MARGIN
local DEFAULT_STATUS_LINE = “Native Renoise Subtractive Synth”
local vb = renoise.ViewBuilder()
local w = renoise.app().window
– Osc 1
local vb_osc1_wave
local vb_osc1_pmod
local vb_osc1_tran
local vb_osc1_tune
local vb_osc1_volu
local vb_osc1_pann
vb_osc1_wave = vb:rotary {
min = 1,
max = 4,
value = 1,
notifier = function(v)
w.active_middle_frame=4
w.active_lower_frame=3
renoise.song().selected_sample_index=2
osc_generate_wave(1,
math.floor(v+0.4),
math.floor(vb_osc1_pmod.value))
vb_osc1_wave.tooltip = wave_name_from_type(math.floor(v+0.4))
vb_status.text = "Oscillator 1 waveform: "…
wave_name_from_type(math.floor(v+0.4))
end
}
vb_osc1_pmod = vb:rotary {
min = 1,
max = 128,
midi_mapping = “true”,
value = 1,
notifier = function(v)
w.active_middle_frame=4
w.active_lower_frame=3
renoise.song().selected_sample_index=2
osc_generate_wave(1,
math.floor(vb_osc1_wave.value+0.4),
math.floor(v))
vb_osc1_pmod.tooltip = tostring(math.floor(v-64))
vb_status.text = "Oscillator 1 phase bias: "…
tostring(math.floor(v-64))
end
}
vb_osc1_tran = vb:rotary {
min = -24,
max = 24,
midi_mapping = “true”,
value = 0,
notifier = function(v)
w.active_middle_frame=4
w.active_lower_frame=3
renoise.song().selected_sample_index=2
osc_transpose(1, v)
vb_osc1_tran.tooltip = tostring(math.floor(v))
vb_status.text = "Oscillator 1 transpose: "…
tostring(math.floor(v))
end
}
vb_osc1_tune = vb:rotary {
min = -63,
max = 64,
midi_mapping = “true”,
value = 0,
notifier = function(v)
w.active_middle_frame=4
w.active_lower_frame=3
renoise.song().selected_sample_index=2
osc_finetune(1, v)
vb_osc1_tune.tooltip = tostring(math.floor(v))
vb_status.text = "Oscillator 1 tuning: "…
tostring(math.floor(v))
end
}
vb_osc1_volu = vb:rotary {
min = -60,
max = 0,
midi_mapping = “true”,
value = 0,
notifier = function(v)
w.active_middle_frame=4
w.active_lower_frame=3
renoise.song().selected_sample_index=2
osc_vol(1, v)
vb_osc1_volu.tooltip = tostring(math.floor(v))
vb_status.text = "Oscillator 1 volume: "…
tostring(math.floor(v))
end
}
vb_osc1_pann = vb:rotary {
min = -50,
max = 50,
midi_mapping = “true”,
value = 0,
notifier = function(v)
w.active_middle_frame=4
w.active_lower_frame=3
renoise.song().selected_sample_index=2
osc_pan(1, v)
vb_osc1_pann.tooltip = tostring(math.floor(v))
vb_status.text = "Oscillator 1 panning: "…
tostring(math.floor(v))
end
}
– Osc 2
local vb_osc2_wave
local vb_osc2_pmod
local vb_osc2_tran
local vb_osc2_tune
local vb_osc2_volu
local vb_osc2_pann
vb_osc2_wave = vb:rotary {
min = 1,
max = 4,
midi_mapping = “true”,
value = 1,
notifier = function(v)
w.active_middle_frame=4
w.active_lower_frame=3
renoise.song().selected_sample_index=3
osc_generate_wave(2,
math.floor(v+0.4),
math.floor(vb_osc2_pmod.value))
vb_osc2_wave.tooltip = wave_name_from_type(math.floor(v+0.4))
vb_status.text = "Oscillator 2 waveform: "…
wave_name_from_type(math.floor(v+0.4))
end
}
vb_osc2_pmod = vb:rotary {
min = 1,
max = 128,
midi_mapping = “true”,
value = 1,
notifier = function(v)
w.active_middle_frame=4
w.active_lower_frame=3
renoise.song().selected_sample_index=3
osc_generate_wave(2,
math.floor(vb_osc2_wave.value+0.4),
math.floor(v))
vb_osc2_pmod.tooltip = tostring(math.floor(v-64))
vb_status.text = "Oscillator 2 phase bias: "…
tostring(math.floor(v-64))
end
}
vb_osc2_tran = vb:rotary {
min = -24,
max = 24,
midi_mapping = “true”,
value = 0,
notifier = function(v)
w.active_middle_frame=4
w.active_lower_frame=3
renoise.song().selected_sample_index=3
osc_transpose(2, v)
vb_osc2_tran.tooltip = tostring(math.floor(v))
vb_status.text = "Oscillator 2 transpose: "…
tostring(math.floor(v))
end
}
vb_osc2_tune = vb:rotary {
min = -63,
max = 64,
midi_mapping = “true”,
value = 0,
notifier = function(v)
w.active_middle_frame=4
w.active_lower_frame=3
renoise.song().selected_sample_index=3
osc_finetune(2, v)
vb_osc2_tune.tooltip = tostring(math.floor(v))
vb_status.text = "Oscillator 2 tuning: "…
tostring(math.floor(v))
end
}
vb_osc2_volu = vb:rotary {
min = -60,
max = 0,
midi_mapping = “true”,
value = 0,
notifier = function(v)
w.active_middle_frame=4
w.active_lower_frame=3
renoise.song().selected_sample_index=3
osc_vol(2, v)
vb_osc2_volu.tooltip = tostring(math.floor(v))
vb_status.text = "Oscillator 2 volume: "…
tostring(math.floor(v))
end
}
vb_osc2_pann = vb:rotary {
min = -50,
max = 50,
midi_mapping = “true”,
value = 0,
notifier = function(v)
w.active_middle_frame=4
w.active_lower_frame=3
renoise.song().selected_sample_index=3
osc_pan(2, v)
vb_osc2_pann.tooltip = tostring(math.floor(v))
vb_status.text = "Oscillator 2 panning: "…
tostring(math.floor(v))
end
}
vb_status = vb:text {align = “right”,
width = 200,
}
vb_footer = vb:horizontal_aligner {spacing = CONTENT_SPACING,
margin = DEFAULT_DIALOG_MARGIN,
vb:bitmap {bitmap = “images/resynth.bmp”,
},
vb_status
}
vb_dialog = vb:vertical_aligner {
margin = DEFAULT_DIALOG_MARGIN,
vb:horizontal_aligner {
margin = DEFAULT_DIALOG_MARGIN,
spacing = 8,
– Waveform
vb:vertical_aligner {
spacing = CONTENT_SPACING,
vb_osc1_wave,
vb_osc2_wave,
vb:text {
text = “Wave”,
align = “center”,
width = 32,
},
},
– Phase Mod
vb:vertical_aligner {
spacing = CONTENT_SPACING,
vb_osc1_pmod,
vb_osc2_pmod,
vb:text {
text = “Mod”,
align = “center”,
width = 32,
},
},
– Transpose
vb:vertical_aligner {
spacing = CONTENT_SPACING,
vb_osc1_tran,
vb_osc2_tran,
vb:text {
text = “Tran”,
align = “center”,
width = 32,
},
},
– Tuning
vb:vertical_aligner {
spacing = CONTENT_SPACING,
vb_osc1_tune,
vb_osc2_tune,
vb:text {
text = “Tune”,
align = “center”,
width = 32,
},
},
– Volume
vb:vertical_aligner {
spacing = CONTENT_SPACING,
vb_osc1_volu,
vb_osc2_volu,
vb:text {
text = “Vol”,
align = “center”,
width = 32,
},
},
– Panning
vb:vertical_aligner {
spacing = CONTENT_SPACING,
vb_osc1_pann,
vb_osc2_pann,
vb:text {
text = “Pan”,
align = “center”,
width = 32,
},
},
},
vb_footer,
}
dialog_instance = nil
function update_controls()
– Update the GUI controls
– Values
vb_osc1_wave.value = wave_type_from_name(1)
vb_osc1_pmod.value = wave_pd_from_name(1)
vb_osc1_tran.value = inst.samples[2].transpose
vb_osc1_tune.value = inst.samples[2].fine_tune
vb_osc1_volu.value = math.lin2db(inst.samples[2].volume)
vb_osc1_pann.value = (inst.samples[2].panning -0.5)*100
vb_osc2_wave.value = wave_type_from_name(2)
vb_osc2_pmod.value = wave_pd_from_name(2)
vb_osc2_tran.value = inst.samples[3].transpose
vb_osc2_tune.value = inst.samples[3].fine_tune
vb_osc2_volu.value = math.lin2db(inst.samples[3].volume)
vb_osc2_pann.value = (inst.samples[3].panning -0.5)*100
– Tooltips
vb_osc1_wave.tooltip = tostring(wave_type_from_name(1))
vb_osc1_pmod.tooltip = tostring(math.floor(vb_osc1_pmod.value-64))
vb_osc1_tran.tooltip = tostring(math.floor(vb_osc1_tran.value))
vb_osc1_tune.tooltip = tostring(math.floor(vb_osc1_tune.value))
vb_osc1_volu.tooltip = tostring(math.floor(vb_osc1_volu.value))
vb_osc1_pann.tooltip = tostring(math.floor(vb_osc1_pann.value))
vb_osc2_wave.tooltip = tostring(wave_type_from_name(2))
vb_osc2_pmod.tooltip = tostring(math.floor(vb_osc2_pmod.value-64))
vb_osc2_tran.tooltip = tostring(math.floor(vb_osc2_tran.value))
vb_osc2_tune.tooltip = tostring(math.floor(vb_osc2_tune.value))
vb_osc2_volu.tooltip = tostring(math.floor(vb_osc2_volu.value))
vb_osc2_pann.tooltip = tostring(math.floor(vb_osc2_pann.value))
– Reset status line
vb_status.text = DEFAULT_STATUS_LINE
end
function create_dialog()
update_controls()
dialog_instance = renoise.app():show_custom_dialog(“ReSynth”, vb_dialog)
end
Works for me as that’s how I made the demo patches in the first post. Can someone else please check this please?
Don’t rename sample 00 though as that’s the identification key.
i dont rename.
what I did was switch “the whole instrument” to NNA - which I guess in this case means that either sample2 or sample3 were switched to NNA-continue. maybe that’s the detail?
The midi mappings do not operate on the GUI, on the controls, but can change “anything”. This way you can also use the mappings without a GUI. The only thing you do in the GUI via the “midi_mapping” property is telling Renoise which mapping should be automatically selected via the MIDI mapping dialog when clicking on the control.
So all the main logic is in the mappings itself and not the GUI. For example, if you want to change a continuous float value, you can do something like:
local some_value = 0 -- normalized value [0-1]
renoise.tool():add_midi_mapping{
name = "com.renoise.MyTool:Change some_value",
invoke = function(message)
local new_value = some_value
if (message:is_abs_value()) then
new_value = message.int_value / 127
elseif (message:is_rel_value()) then
new_value = new_value + message.int_value / 127
new_value = math.max(0, math.min(1, new_value))
end
some_value = new_value
end
}
If you have a GUI for some_value, you also need to update the GUI’s value, unless you do use document value, in both, the GUI (which uses “bind” to link a document value) and midi_mappings.
See GitHub - renoise/xrnx: The official Renoise Lua Scripting repository for more details about the mapping messages please.
See GitHub - renoise/xrnx: The official Renoise Lua Scripting repository (Renoises inbuilt set of MIDI Mappings) for more “invoke” examples.
Uhh, what happened? I’m still waiting for a ReSynth version where one can start the editor and create a new sample with one click, etc? Using ReSynth at gigs is incredibly tedious without this feature…
And I just used it at yaga for my gig.
That’s hardcore Esa , using a supposed non-realtime synth live. How did you incorporate it in the set/song you was playing?
I just set it to various settings. I’ve modified it so that I see the osc1 or osc2 depending on which slider i move. I must admit that I only really used it to quickly generate sinewaves (which isn’t that fast because the knob that controls the waveform has a LOT of resolution, when it could only have 5-6?..)) - to get that very specific deep sine bass:)
… Who knows - maybe it could be possible for ReSynth to be commanded via automation or stepsequencer (maybe even inside the gui)
Hi,
Sorry all, various things came up that I had to deal with.
I’ll try and push it out tomorrow.
1.0 has been uploaded and is now awaiting tool moderator QA and approval.
esaruoho, can you please tell me more about how you used it live? Did you assign a midi controller to the instrument and some midi controllers to ReSynth and use that instrument for live playing?
Enjoy!
I would just use it to quickly create a sound I’m looking after and then start laying down lines with it, being basslines or melody lines - and processing them via Ableton Live as I’d be running Renoise in ReWire-mode.
I did more with ReSynth in the soundcheck, but couldn’t bring myself to spend time figuring out how to combine the two functions of create_new+open_gui during it and thus did less durin the gig. No midicontrollers - altho that’s a splendid idea - I’ll try with my Korg NanoKontrol.
So nothing shocking usagewise
I play a pretty multilayered thing live so I might suddenly mix in some purer (lower bass) tones or some melodies and play them in during the set and stuff…
Great tool.
Played around with version 1.00 on the Tools page. I got an error, once, but I can’t reproduce it.
Here’s how I remember it going down:
ScriptingEngine: ./actions.lua:183: attempt to index global 'inst' (a nil value)
stack traceback:
./actions.lua:183: in function 'wave_type_from_name'
./gui.lua:294: in function 'update_controls'
main.lua:54: in function 'open_resynth_gui'
main.lua:142: in function <141><br>
<br>
<br>```
<br>
<br>
Cheers.</141>
in theory this is possible. i also did some experiments but this only works for very simple waves, since the scripting engine does not run at real priority so it will always remain behind the audio engine, resulting into unbearably sighing audio. You can successfully change the parameters while not playing, though
Hi,
Thanks for the detailed bug report. I found the issue and fixed it. A new version is working its way through quarantine now.
(The issue was a dialog check was before the instrument check rather than the other way around - this lead to a crash when opening the GUI while it was already open but the instrument had changed to a non-ReSynth instrument).
Played with it for 30 seconds until Renoise froze completely! Also, when the GUI is open, playing the synth with the computer keyboard leads to extremely choppy and delayed sound. With the GUI closed it is fine (well, it is only a sample then).
The crash occured on Linux (Ubuntu 11.04) btw.
Hi, was using ReSynth in a track - first made one ReSynth sound, then created another (but without opening the gui for that one). then decided to “make sure” and copy and paste the ReSynth instrument in the instrument box. then opened gui in this copy, and got
‘/Users/esaruoho/Library/Preferences/Renoise/V2.7.2/Scripts/Tools/com.mxb.ReSynth.xrnx/main.lua’ failed in one of its notifiers.
Please contact the author (Martin Bealby | mxb (mbealby@gmail.com)) for assistance…
./actions.lua:183: attempt to index global ‘inst’ (a nil value)
stack traceback:
./actions.lua:183: in function ‘wave_type_from_name’
./actions.lua:119: in function ‘osc_generate_wave’
./gui.lua:46: in function <./gui.lua:45>
This is Great simple experimental stuff. Exactly what I am looking for actually… if only it could also select every waveform from the AKWF pack, and about 4 oscs, we’d never need a VSTi again Anyway this is actually kind of what I wanted to build for that pack. Going to explore the code
Oh and one thing: all rotaries light up with the midi bindings window opened, except for the very first one. Also they are still not clickable, you’ll have to find the entries in the list. A renoise thing? or a ReSynth thing?