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”] ```
– ReSynth Tool
– Copyright 2011 Martin Bealby
– GUI code
– Variables
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
– Functions
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