~hp/moony.lv2

23359a17ff81f7788e892a209fb2ea61fc8084e4 — Hanspeter Portner 11 months ago e7f79fb
Make preset license header more concise
M meson_options.txt => meson_options.txt +1 -1
@@ 43,4 43,4 @@ option('lv2libdir',
	type : 'string',
	value : 'lib/lv2')

option('version', type : 'string', value : '0.41.61')
option('version', type : 'string', value : '0.41.95')

M plugin/bank-through_atom-through.lua => plugin/bank-through_atom-through.lua +1 -1
@@ 1,4 1,4 @@
-- SPDX-FileCopyrightText: Hanspeter Portner <dev@open-music-kontrollers.ch>
-- SPDX-FileCopyrightText: open-music-kontrollers.ch
-- SPDX-License-Identifier: CC0-1.0

function run(n, control, notify, seq, forge, ...)

M plugin/bank-through_atom-through2.lua => plugin/bank-through_atom-through2.lua +1 -1
@@ 1,4 1,4 @@
-- SPDX-FileCopyrightText: Hanspeter Portner <dev@open-music-kontrollers.ch>
-- SPDX-FileCopyrightText: open-music-kontrollers.ch
-- SPDX-License-Identifier: CC0-1.0

function run(n, control, notify, seq1, forge1, seq2, forge2)

M plugin/bank-through_atom-through4.lua => plugin/bank-through_atom-through4.lua +1 -1
@@ 1,4 1,4 @@
-- SPDX-FileCopyrightText: Hanspeter Portner <dev@open-music-kontrollers.ch>
-- SPDX-FileCopyrightText: open-music-kontrollers.ch
-- SPDX-License-Identifier: CC0-1.0

function run(n, control, notify, seq1, forge1, seq2, forge2, seq3, forge3, seq4, forge4)

M plugin/bank-through_control-through.lua => plugin/bank-through_control-through.lua +1 -1
@@ 1,4 1,4 @@
-- SPDX-FileCopyrightText: Hanspeter Portner <dev@open-music-kontrollers.ch>
-- SPDX-FileCopyrightText: open-music-kontrollers.ch
-- SPDX-License-Identifier: CC0-1.0

function run(n, control, notify, ...)

M plugin/moony.ttl.in => plugin/moony.ttl.in +36 -9
@@ 193,7 193,10 @@ moony:c1xc1
		moony:paramHidden true ;
		moony:paramCols 3 ;
		moony:paramRows 4 ;
		moony:code """function run(n, control, notify, c1)
		moony:code """-- SPDX-FileCopyrightText: open-music-kontrollers.ch
-- SPDX-License-Identifier: CC0-1.0

function run(n, control, notify, c1)
	return c1
end"""
	] .


@@ 286,7 289,10 @@ moony:c2xc2
		moony:paramHidden true ;
		moony:paramCols 3 ;
		moony:paramRows 4 ;
		moony:code """function run(n, control, notify, c1, c2)
		moony:code """-- SPDX-FileCopyrightText: open-music-kontrollers.ch
-- SPDX-License-Identifier: CC0-1.0

function run(n, control, notify, c1, c2)
	return c1, c2
end"""
	] .


@@ 409,7 415,10 @@ moony:c4xc4
		moony:paramHidden true ;
		moony:paramCols 3 ;
		moony:paramRows 4 ;
		moony:code """function run(n, control, notify, c1, c2, c3, c4)
		moony:code """-- SPDX-FileCopyrightText: open-music-kontrollers.ch
-- SPDX-License-Identifier: CC0-1.0

function run(n, control, notify, c1, c2, c3, c4)
	return c1, c2, c3, c4
end"""
	] .


@@ 492,7 501,10 @@ moony:a1xa1
		moony:paramHidden true ;
		moony:paramCols 3 ;
		moony:paramRows 4 ;
		moony:code """function run(n, control, notify, seq, forge)
		moony:code """-- SPDX-FileCopyrightText: open-music-kontrollers.ch
-- SPDX-License-Identifier: CC0-1.0

function run(n, control, notify, seq, forge)
	for frames, atom in seq:foreach() do
		forge:time(frames):atom(atom)
	end


@@ 597,7 609,10 @@ moony:a2xa2
		moony:paramHidden true ;
		moony:paramCols 3 ;
		moony:paramRows 4 ;
		moony:code """function run(n, control, notify, seq1, forge1, seq2, forge2)
		moony:code """-- SPDX-FileCopyrightText: open-music-kontrollers.ch
-- SPDX-License-Identifier: CC0-1.0

function run(n, control, notify, seq1, forge1, seq2, forge2)
	for frames, atom in seq1:foreach() do
		forge1:time(frames):atom(atom)
	end


@@ 746,7 761,10 @@ moony:a4xa4
		moony:paramHidden true ;
		moony:paramCols 3 ;
		moony:paramRows 4 ;
		moony:code """function run(n, control, notify, seq1, forge1, seq2, forge2, seq3, forge3, seq4, forge4)
		moony:code """-- SPDX-FileCopyrightText: open-music-kontrollers.ch
-- SPDX-License-Identifier: CC0-1.0

function run(n, control, notify, seq1, forge1, seq2, forge2, seq3, forge3, seq4, forge4)
	for frames, atom in seq1:foreach() do
		forge1:time(frames):atom(atom)
	end


@@ 860,7 878,10 @@ moony:c1a1xc1a1
		moony:paramHidden true ;
		moony:paramCols 3 ;
		moony:paramRows 4 ;
		moony:code """function run(n, control, notify, seq, forge, c1)
		moony:code """-- SPDX-FileCopyrightText: open-music-kontrollers.ch
-- SPDX-License-Identifier: CC0-1.0

function run(n, control, notify, seq, forge, c1)
	for frames, atom in seq:foreach() do
		forge:time(frames):atom(atom)
	end


@@ 979,7 1000,10 @@ moony:c2a1xc2a1
		moony:paramHidden true ;
		moony:paramCols 3 ;
		moony:paramRows 4 ;
		moony:code """function run(n, control, notify, seq, forge, c1, c2)
		moony:code """-- SPDX-FileCopyrightText: open-music-kontrollers.ch
-- SPDX-License-Identifier: CC0-1.0

function run(n, control, notify, seq, forge, c1, c2)
	for frames, atom in seq:foreach() do
		forge:time(frames):atom(atom)
	end


@@ 1128,7 1152,10 @@ moony:c4a1xc4a1
		moony:paramHidden true ;
		moony:paramCols 3 ;
		moony:paramRows 4 ;
		moony:code """function run(n, control, notify, seq, forge, c1, c2, c3, c4)
		moony:code """-- SPDX-FileCopyrightText: open-music-kontrollers.ch
-- SPDX-License-Identifier: CC0-1.0

function run(n, control, notify, seq, forge, c1, c2, c3, c4)
	for frames, atom in seq:foreach() do
		forge:time(frames):atom(atom)
	end

M plugin/presets.ttl.in => plugin/presets.ttl.in +87 -20
@@ 157,7 157,10 @@ moony:bank-multiplex_atom-multiplex2
		moony:paramHidden true ;
		moony:paramCols 3 ;
		moony:paramRows 4 ;
		moony:code """function run(n, control, notify, seq1, forge1, seq2, forge2)
		moony:code """-- SPDX-FileCopyrightText: open-music-kontrollers.ch
-- SPDX-License-Identifier: CC0-1.0

function run(n, control, notify, seq1, forge1, seq2, forge2)
	for frames, atom in seq1:foreach(seq2) do
		forge1:time(frames):atom(atom)
		forge2:time(frames):atom(atom)


@@ 179,7 182,10 @@ moony:bank-multiplex_atom-multiplex4
		moony:paramHidden true ;
		moony:paramCols 3 ;
		moony:paramRows 4 ;
		moony:code """function run(n, control, notify, seq1, forge1, seq2, forge2, seq3, forge3, seq4, forge4)
		moony:code """-- SPDX-FileCopyrightText: open-music-kontrollers.ch
-- SPDX-License-Identifier: CC0-1.0

function run(n, control, notify, seq1, forge1, seq2, forge2, seq3, forge3, seq4, forge4)
	for frames, atom in seq1:foreach(seq2, seq3, seq4) do
		forge1:time(frames):atom(atom)
		forge2:time(frames):atom(atom)


@@ 203,7 209,10 @@ moony:bank-midi_midi-responder
		moony:paramHidden true ;
		moony:paramCols 3 ;
		moony:paramRows 4 ;
		moony:code """local midiR = MIDIResponder({
		moony:code """-- SPDX-FileCopyrightText: open-music-kontrollers.ch
-- SPDX-License-Identifier: CC0-1.0

local midiR = MIDIResponder({
	[MIDI.NoteOn] = function(self, frames, forge, chan, note, vel)
		forge:time(frames):midi(MIDI.NoteOn | chan, note, vel)
	end,


@@ 233,7 242,10 @@ moony:bank-time_midi-sequencer
		moony:paramHidden true ;
		moony:paramCols 3 ;
		moony:paramRows 4 ;
		moony:code """local timeR = TimeResponder({
		moony:code """-- SPDX-FileCopyrightText: open-music-kontrollers.ch
-- SPDX-License-Identifier: CC0-1.0

local timeR = TimeResponder({
  [Time.speed] = function(self, frames, forge, speed)
    self.rolling = speed > 0.0
    if not self.rolling and forge then


@@ 287,7 299,10 @@ moony:bank-time_lindenmayer-system
		moony:paramHidden true ;
		moony:paramCols 3 ;
		moony:paramRows 4 ;
		moony:code """local mtointeger = math.tointeger -- reference locally
		moony:code """-- SPDX-FileCopyrightText: open-music-kontrollers.ch
-- SPDX-License-Identifier: CC0-1.0

local mtointeger = math.tointeger -- reference locally

local rolling = false -- transport state
local oldNote = nil -- currently palying note


@@ 391,7 406,10 @@ moony:bank-osc_osc-responder
		moony:paramHidden true ;
		moony:paramCols 3 ;
		moony:paramRows 4 ;
		moony:code """local oscR = OSCResponder({
		moony:code """-- SPDX-FileCopyrightText: open-music-kontrollers.ch
-- SPDX-License-Identifier: CC0-1.0

local oscR = OSCResponder({
	['/ping'] = function(self, frames, forge, fmt, ...)
		forge:time(frames):message('/pong', fmt, ...)
	end,


@@ 421,7 439,10 @@ moony:bank-state_state-responder
		moony:paramHidden false ;
		moony:paramCols 3 ;
		moony:paramRows 4 ;
		moony:code """local urn = Mapper('urn:uuid:ecc34531-c5a5-4fd4-9edf-14f2d8cf7b57#')
		moony:code """-- SPDX-FileCopyrightText: open-music-kontrollers.ch
-- SPDX-License-Identifier: CC0-1.0

local urn = Mapper('urn:uuid:ecc34531-c5a5-4fd4-9edf-14f2d8cf7b57#')
local sync = false

local pLong


@@ 563,7 584,7 @@ end

function run(n, control, notify)
  for frames, atom in control:foreach() do
    if stateR(frames, notify, atom) and sync then
    if stateR(frames, notify, atom) or sync then
			stateR:sync(frames, notify)
			sync = false
		end


@@ 592,7 613,10 @@ moony:bank-canvas_lv2-logo
		moony:paramHidden false ;
		moony:paramCols 1 ;
		moony:paramRows 2 ;
		moony:code """local srate = Options[Param.sampleRate]
		moony:code """-- SPDX-FileCopyrightText: open-music-kontrollers.ch
-- SPDX-License-Identifier: CC0-1.0

local srate = Options[Param.sampleRate]
srate = srate and srate.body or 48000 -- get DSP sample rate or fallback

local urate = Options[Ui.updateRate]


@@ 699,11 723,22 @@ local graph = Parameter({
		return render() -- whenever the parameter is requested, render graph
	end
})
local aspectRatio = Parameter({
	[RDFS.label] = 'AspectRatio',
	[RDFS.comment] = 'Aspect ratio of graph',
	[RDFS.range] = Atom.Float,
	[LV2.minimum] = 0,
	[LV2.maximum] = 10,
	[RDF.value] = 1/1
})

-- define a StateResponder object
local stateR = StateResponder({
	[Patch.readable] = {
		[Canvas.graph] = graph
	},
	[Patch.writable] = {
		[Canvas.aspectRatio] = aspectRatio
	}
})



@@ 744,7 779,10 @@ moony:bank-tutorial_part-1
		moony:paramHidden true ;
		moony:paramCols 3 ;
		moony:paramRows 4 ;
		moony:code """-- Tutorial 1: MIDI Channel Blocker
		moony:code """-- SPDX-FileCopyrightText: open-music-kontrollers.ch
-- SPDX-License-Identifier: CC0-1.0

-- Tutorial 1: MIDI Channel Blocker

-- define table which holds active MIDI channels
local channels = {0, 2, 4, 6}


@@ 790,7 828,10 @@ moony:bank-tutorial_part-2
		moony:paramHidden true ;
		moony:paramCols 3 ;
		moony:paramRows 4 ;
		moony:code """-- Tutorial 2: MIDI Chorder
		moony:code """-- SPDX-FileCopyrightText: open-music-kontrollers.ch
-- SPDX-License-Identifier: CC0-1.0

-- Tutorial 2: MIDI Chorder

-- define table that holds number of chord notes and their offsets
local chord = {0, 12, 24, 36} -- octaves, obviously


@@ 836,7 877,10 @@ moony:bank-tutorial_part-3
		moony:paramHidden true ;
		moony:paramCols 3 ;
		moony:paramRows 4 ;
		moony:code """-- Tutorial 3: MIDI Sample & Hold
		moony:code """-- SPDX-FileCopyrightText: open-music-kontrollers.ch
-- SPDX-License-Identifier: CC0-1.0

-- Tutorial 3: MIDI Sample & Hold

local urn = Mapper('urn:uuid:03340863-7f87-4f67-9fc9-9cac49c2dfba3#') -- prefix of this presets URIs
local sample = false -- flag to tell whether we are sampling or not


@@ 933,7 977,10 @@ moony:bank-tutorial_part-4
		moony:paramHidden true ;
		moony:paramCols 3 ;
		moony:paramRows 4 ;
		moony:code """-- Tutorial 4: MIDI Arpeggiator
		moony:code """-- SPDX-FileCopyrightText: open-music-kontrollers.ch
-- SPDX-License-Identifier: CC0-1.0

-- Tutorial 4: MIDI Arpeggiator

local schar = string.char -- local variable is more efficient to look up



@@ 1025,7 1072,10 @@ moony:bank-tutorial_part-5
		moony:paramHidden true ;
		moony:paramCols 3 ;
		moony:paramRows 4 ;
		moony:code """-- Tutorial 5: MIDI Velocity Curve Interpolator
		moony:code """-- SPDX-FileCopyrightText: open-music-kontrollers.ch
-- SPDX-License-Identifier: CC0-1.0

-- Tutorial 5: MIDI Velocity Curve Interpolator

local X = {0, 15, 112, 127} -- X-coordinates of curve
local Y = {0,  7, 120, 127} -- Y-coordinates of curve


@@ 1088,8 1138,10 @@ moony:bank-tutorial_part-6
		moony:paramHidden true ;
		moony:paramCols 3 ;
		moony:paramRows 4 ;
		moony:code """-- Tutorial 6: MIDI Sequencer
		moony:code """-- SPDX-FileCopyrightText: open-music-kontrollers.ch
-- SPDX-License-Identifier: CC0-1.0

-- Tutorial 6: MIDI Sequencer

local urn = Mapper('urn:uuid:4cc65393-869d-4ca1-8ac4-fcbe902b36d6#')



@@ 1192,7 1244,10 @@ moony:bank-template_part-1
		moony:paramHidden true ;
		moony:paramCols 3 ;
		moony:paramRows 4 ;
		moony:code """-- Template 1: MIDI Responder
		moony:code """-- SPDX-FileCopyrightText: open-music-kontrollers.ch
-- SPDX-License-Identifier: CC0-1.0

-- Template 1: MIDI Responder

local block = false -- route unmatched messages as-is



@@ 1278,7 1333,10 @@ moony:bank-template_part-2
		moony:paramHidden true ;
		moony:paramCols 3 ;
		moony:paramRows 4 ;
		moony:code """-- Template 2: Time Responder
		moony:code """-- SPDX-FileCopyrightText: open-music-kontrollers.ch
-- SPDX-License-Identifier: CC0-1.0

-- Template 2: Time Responder

-- define a TimeResponder object
local timeR = TimeResponder({


@@ 1345,7 1403,10 @@ moony:bank-template_part-3
		moony:paramHidden true ;
		moony:paramCols 3 ;
		moony:paramRows 4 ;
		moony:code """-- Template 3: OSC Responder
		moony:code """-- SPDX-FileCopyrightText: open-music-kontrollers.ch
-- SPDX-License-Identifier: CC0-1.0

-- Template 3: OSC Responder

-- define an OSCResponder object
local oscR = OSCResponder({


@@ 1378,7 1439,10 @@ moony:bank-template_part-4
		moony:paramHidden false ;
		moony:paramCols 3 ;
		moony:paramRows 4 ;
		moony:code """-- Template 4: State Responder
		moony:code """-- SPDX-FileCopyrightText: open-music-kontrollers.ch
-- SPDX-License-Identifier: CC0-1.0

-- Template 4: State Responder

-- define URI prefix for state parameters
local urn = Mapper('urn:uuid:3473b33a-e6d2-471c-89d3-4dea1a0d8feb#')


@@ 1440,7 1504,10 @@ moony:bank-template_part-5
		moony:paramHidden false ;
		moony:paramCols 1 ;
		moony:paramRows 1 ;
		moony:code """-- Template 5: Code Injection
		moony:code """-- SPDX-FileCopyrightText: open-music-kontrollers.ch
-- SPDX-License-Identifier: CC0-1.0

-- Template 5: Code Injection

-- define URI prefix for state parameters
local urn = Mapper('urn:uuid:1ad928a1-e050-4380-be39-8dca9bc18f44#')