-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
samba
committed
Jul 16, 2024
1 parent
cd2c290
commit ff510d1
Showing
4 changed files
with
126 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
require "/lua/com/com" | ||
|
||
local function checkinstrument (instrument) | ||
if instrument == nil then | ||
return false | ||
end | ||
if instrument.name == nil then | ||
return false | ||
end | ||
if instrument.children ~= nil then | ||
for _, child in pairs(instrument.children) do | ||
return checkinstrument(child) | ||
end | ||
end | ||
if instrument.midiChannel == nil then | ||
return false | ||
end | ||
return true | ||
end | ||
|
||
function perform(events, params, timeinfo) | ||
if checkinstrument(events[1].instrument) == false then | ||
return {} | ||
end | ||
return events | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
|
||
using "./modinstrumentinfo.lua"; | ||
|
||
device: _setName=MyDevice _isType=midi _useDevice="FLUID Synth"; | ||
instrumentDef: _setName=piano _onDevice=MyDevice _ch=0 _pc=1 _cc=8; | ||
instrumentConf: piano mod modinstrumentinfo; | ||
|
||
instrumentDef: _setName=p1 _onDevice=MyDevice _ch=1 _pc=100; | ||
instrumentDef: _setName=p2 _onDevice=MyDevice _ch=2 _pc=12; | ||
instrumentSection: mySection p1 p2; | ||
-- instrumentConf: mySection mod modinstrumentinfo; -- https://github.com/werckme/werckmeister/issues/424 | ||
|
||
[ | ||
instrument: piano; | ||
{ | ||
c d e f | g a b c' | ||
} | ||
] | ||
|
||
[ | ||
instrument: mySection; | ||
{ | ||
/mod: modinstrumentinfo/ | ||
c, d, e, f, | g, a, b, c | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters