colinfwren / midi-to-lsdj Goto Github PK
View Code? Open in Web Editor NEWConvert a MIDI file into LSDJ project
License: GNU Affero General Public License v3.0
Convert a MIDI file into LSDJ project
License: GNU Affero General Public License v3.0
Add support for pitch-bending (pitchBend
in midi-file
) and map that to a either a P
or S
command (allow user to define this?)
LSDJ Manual for P
4.13 P: Pitch Bend
4.13.1 For Pulse, Wave and Kit Instruments:
Does a pitch change with the given speed. The behavior depends on the instru-
ment’s PITCH setting:
DRUM Logarithmic pitch bend that updates at 360 Hz.
FAST Linear pitch bend that updates at 360 Hz.
TICK Pitch bend that updates every tick.
STEP Immediate pitch change without bend.
Example:
P02 Pitch change up with speed 2.
PFE Pitch change down with speed 2. (FE=-2)
LSDJ manual for S
4.15 S: Sweep/Shape
This command has different effects for different instrument types.
4.15.1 Pulse Instruments
Frequency sweep, useful for bass drums and percussion. The first digit sets
time, the second sets pitch increase/decrease. Only works on the first pulse
channel.
4.15.2 Kit Instruments
S changes the loop points. The first digit modulates the offset value; the second
digit modulates the loop length. (1-7=increase, 9-F=decrease.) Used creatively,
this command can be very useful for creating a wide range of percussive and
timbral effects.
4.15.3 Noise Instruments
Alters noise shape (see section 2.6.5). The command is relative, meaning that
the digits are independently added to the active noise shape.
While the setTempo events are collected in getTrackEvents
these are not currently plotted out. In order to create an accurate transcription there should be commands on the notes to trigger the tempo change.
As per the LSDJ Manual
4.16 T: Tempo
Changes the tick rate to match the given beats per minute (BPM) value. The
BPM is accurate only if the active groove has 6 ticks per note step. If the groove
has some other number of ticks per note step, the BPM value should be adjusted
according to the formula lsdj bpm = (desired bpm × ticks per step)/6. T28-TFF
selects 40-255 BPM, T00-T27 selects 256-295 BPM.
Example:
T80 set tempo to 128 BPM
TFF set tempo to 255 BPM
T27 set tempo to 295 BPM
Add means to determine chord and turn that into corresponding chord command
As per LSDJ manual
4.3 C: Chord
Runs an arpeggio that extends the base note with the given semitones. The
speed may be slowed down using CMD/RATE in instrument screen.
C37 plays a minor chord: 0, 3, 7, 0, 3, 7, 0, 3, 7, . . .
C47 plays a major chord: 0, 4, 7, 0, 4, 7, 0, 4, 7, . . .
C0C plays 0, 0, C, 0, 0, C, 0, 0, C, . . .
CC0 plays 0, C, 0, C, 0, C, . . .
CCC plays 0, C, C, 0, C, C, 0, C, C, . . .
C00 resets chord
ToneJS has a wrapper over midi-file which looks like it provides absolute ticks and note duration information which may be make MIDI data easier to work with
Set up basic github actions to run tests on push
TonalJS has a lot of awesome helper functions that handle converting MIDI note values to different representations.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.