Skip to content

Commit

Permalink
MVEL cmd (#82)
Browse files Browse the repository at this point in the history
* MVEL cmd

Set step velocity for MIDI instruments
xiphonics/picoTracker#163


Co-authored-by: djdiskmachine <djdiskmachine@proton.me>
  • Loading branch information
djdiskmachine and djdiskmachine authored Jul 1, 2024
1 parent 98048aa commit 667cb2e
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 7 deletions.
7 changes: 6 additions & 1 deletion docs/wiki/What-is-LittleGPTracker.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# What is LittleGPTracker?
[*LittleGPTracker*](http://www.10pm.org/nostromo/lgpt/) *(a.k.a piggy tracker) is a sample based tracker originally programed for the gamepark handhelds and PSP but now also available for Microsoft Windows and ~~Mac OSX~~. It implements a user interface similar to the refined track-by-joypad software* [*littlesounddj*](http://www.littlesounddj.com/)*. Piggy currently supports 8 monophonic 8Bit/16Bit/44.1Khz stereo channels as well as 16 channel midi output. Piggy is currently under development and the latest versions of the program (along with beta builds) can be found at* [*https://github.com/djdiskmachine/LittleGPTracker/releases/*](https://github.com/djdiskmachine/LittleGPTracker/releases/)*.*
[*LittleGPTracker*](https://www.littlegptracker.com/) *(a.k.a piggy tracker) is a sample based tracker originally programed for the gamepark handhelds and PSP but now also available for Microsoft Windows, ~~Mac OSX~~ and an assortment of more modern handheld devices. It implements a user interface similar to the refined track-by-joypad software* [*littlesounddj*](http://www.littlesounddj.com/)*. Piggy currently supports 8 monophonic 8Bit/16Bit/44.1Khz stereo channels as well as 16 channel midi output. Piggy is currently under development and the latest versions of the program (along with beta builds) can be found at* [*https://github.com/djdiskmachine/LittleGPTracker/releases/*](https://github.com/djdiskmachine/LittleGPTracker/releases/)*.*
You are reading a reference manual for those who are comfortable with LSDj or trackers in general. An alternative introduction to LittleGPTracker is our very own [quick_start_guide](https://web.archive.org/web/20170310001122/wiki.littlegptracker.com/doku.php?id=lgpt:quick_start_guide). If you have a question this manual does not answer, please join the [Discord](https://discord.com/invite/NMQVbrFgr3) or in #hexawe on efnet. Don't forget to check out the advanced [tips_tricks](https://web.archive.org/web/20170310001122/wiki.littlegptracker.com/doku.php?id=lgpt:tips_tricks)
If you want to grab some sounds to get off the ground quickly, or want to hear and see what other people have been doing with piggy tracker, download some of the .zip archives from [http://hexawe.net](http://hexawe.net/)!

Expand Down Expand Up @@ -104,6 +104,7 @@ Note: CTRL Key mappings of RT and LT are inverted. Since the keyboard's Arrow Ke
- A: Insert Chain/Phrase/Note.
- A,A: Insert next unused Chain/Phrase/Instrument.
- LT+(B,A): Clone. This will overwrite the current Highlighted Item with a copy of itself using the next unused Item available.
(in song view) while keeping LT pressed, press A again without moving to Deep Clone (clone the phrases within the chain)
- B+A: Cuts the current Highlighted Item .
- A+ARROWS: Updates Highlighted Item value.
- A+UP/DOWN: +/- 0x10.
Expand Down Expand Up @@ -500,6 +501,10 @@ don't forget trying to combine it with complex hop structure !

sends a program change command on the current channel. 0000 is program change 1

## MVEL --bb

Sets MIDI note velocity

## PAN aabb

**PAN aabb: where bb is the pan destination and aa is the speed to get there**
Expand Down
15 changes: 14 additions & 1 deletion projects/resources/packaging/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,20 @@ projects but make sure to backup your old cherished work
just to be safe <3
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Changelog Jan 23 2024
Changelog Feb 1 2024
1.3o_2
Adds:
Alt row count colors, shoutout to https://github.com/edne !
00 and FE song screen colors, shoutout to https://github.com/koi-ikeno !
RG35XX build, thanks to https://github.com/jpma29 for help with testing!
Fixes:
Root folder detection causing issues with importing samples on some systems (thank you jpma29)
Name generator causing issues with importing samples on some systems (thanks Dosly)
Actually random names (fixed random seed, thx Eldsvåda:)
Save as fixed on MIYOO systems (thx Pret4t)
Other:
Refactor help legend

1.3o-1
First stable release!
Fixed errors when random naming projects (shoutouts to 256k!)
Expand Down
1 change: 1 addition & 0 deletions sources/Application/Instruments/CommandList.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ static FourCC _all[]= {
I_CMD_LPOF,
I_CMD_MDCC,
I_CMD_MDPG,
I_CMD_MVEL,
I_CMD_PAN_,
I_CMD_PFIN,
I_CMD_PLOF,
Expand Down
1 change: 1 addition & 0 deletions sources/Application/Instruments/CommandList.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#define I_CMD_TMPO MAKE_FOURCC('T','M','P','O')
#define I_CMD_MDCC MAKE_FOURCC('M','D','C','C')
#define I_CMD_MDPG MAKE_FOURCC('M','D','P','G')
#define I_CMD_MVEL MAKE_FOURCC('M','V','E','L')
#define I_CMD_PLOF MAKE_FOURCC('P','L','O','F')
#define I_CMD_FLTR MAKE_FOURCC('F','L','T','R')
#define I_CMD_TABL MAKE_FOURCC('T','A','B','L')
Expand Down
17 changes: 12 additions & 5 deletions sources/Application/Instruments/MidiInstrument.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include "CommandList.h"
#include "System/Console/Trace.h"
#include <string.h>
#include <cmath>

MidiService *MidiInstrument::svc_=0 ;

Expand All @@ -23,6 +24,7 @@ MidiInstrument::MidiInstrument() {
Insert(v) ;
v=new Variable("table automation",MIP_TABLEAUTO,false) ;
Insert(v) ;
velocity_ = 127;
}

MidiInstrument::~MidiInstrument() {
Expand Down Expand Up @@ -53,15 +55,17 @@ bool MidiInstrument::Start(int c,unsigned char note,bool retrigger) {

MidiMessage msg ;

// send volume
// send initial volume for this midi channel

v=FindVariable(MIP_VOLUME) ;
msg.status_=MIDI_CC+channel ;
msg.data1_=7 ;
msg.data2_=int((v->GetInt()+0.99)/2) ;
msg.data2_ = floor(static_cast<float>(v->GetInt()+0.99)/2) ;
svc_->QueueMessage(msg) ;


// store initial velocity
velocity_ = msg.data2_;
playing_=true ;
retrig_=false ;

Expand Down Expand Up @@ -101,7 +105,7 @@ bool MidiInstrument::Render(int channel,fixed *buffer,int size,bool updateTick)

msg.status_=MIDI_NOTE_ON+mchannel ;
msg.data1_=lastNote_[channel] ;
msg.data2_=0x7F ;
msg.data2_ = velocity_;
svc_->QueueMessage(msg) ;

first_[channel]=false ;
Expand Down Expand Up @@ -151,13 +155,16 @@ void MidiInstrument::ProcessCommand(int channel,FourCC cc,ushort value) {
}
}
break ;
case I_CMD_MVEL: {
velocity_ = floor(static_cast<float>(value / 2));
}; break;

case I_CMD_VOLM:
{
MidiMessage msg ;
msg.status_=MIDI_CC+mchannel ;
msg.data1_=7 ;
msg.data2_=int((value+0.99)/2) ;
msg.data1_= 7;
msg.data2_ = floor(static_cast<float>(value / 2));
svc_->QueueMessage(msg) ;
} ;
break ;
Expand Down
1 change: 1 addition & 0 deletions sources/Application/Instruments/MidiInstrument.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ class MidiInstrument:public I_Instrument {
bool playing_ ;
bool retrig_ ;
int retrigLoop_ ;
char velocity_;
TableSaveState tableState_ ;
bool first_[SONG_CHANNEL_COUNT] ;

Expand Down
5 changes: 5 additions & 0 deletions sources/Application/Utils/HelpLegend.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ static inline std::string* getHelpLegend(FourCC command) {
result[1].assign("send program change bb");
result[2].assign("to current channel");
break;
case I_CMD_MVEL:
result[0].assign("MidiVELocity:--bb");
result[1].assign("Set velocity bb for step");
result[2].assign("");
break;
case I_CMD_PLOF:
result[0].assign("PLay OFfset:aabb");
result[1].assign("jump abs to aa or");
Expand Down

0 comments on commit 667cb2e

Please sign in to comment.