Skip to content

Commit

Permalink
Fix recorder timing issue
Browse files Browse the repository at this point in the history
  • Loading branch information
SubhadeepJasu committed Dec 22, 2021
1 parent ea01c4b commit 07c6d97
Show file tree
Hide file tree
Showing 20 changed files with 315 additions and 376 deletions.
52 changes: 26 additions & 26 deletions data/Themes/Application.css
Original file line number Diff line number Diff line change
Expand Up @@ -378,20 +378,6 @@
.white-key-normal > *:focus {
background-color: rgba(0,0,0,0);
}
.white-key-normal:active {
background-image:linear-gradient(shade(@accent_color, 0.7), shade(@accent_color, 0.5));
box-shadow: 0 -12px 8px -8px alpha(@accent_color, 0.65), inset 0 -1px 4px @accent_color;
}
.white-key-active {
background-image:linear-gradient(shade(@accent_color, 0.7), shade(@accent_color, 0.5));
box-shadow: 0 -12px 8px -8px alpha(@accent_color, 0.65), inset 0 -1px 4px @accent_color;
outline: 0;
}
.white-key-active-auto {
background-image:linear-gradient(shade(@accent_color_complimentary_alternate, 0.7), shade(@accent_color_complimentary_alternate, 0.5));
box-shadow: 0 -12px 8px -8px alpha(@accent_color_complimentary_alternate, 0.65), inset 0 -1px 4px @accent_color_complimentary_alternate;
outline: 0;
}
.white-key-split {
background-image:linear-gradient(#585858, #2e2e2e);
border: 2px solid #000;
Expand All @@ -404,6 +390,20 @@
background-image:linear-gradient(shade(@accent_color_complimentary, 0.7), shade(@accent_color_complimentary, 0.5));
box-shadow: 0 -12px 8px -8px alpha(@accent_color_complimentary, 0.7), inset 0 -1px 4px @accent_color_complimentary;
}
.white-key-active-auto {
background-image:linear-gradient(shade(@accent_color_complimentary_alternate, 0.7), shade(@accent_color_complimentary_alternate, 0.5));
box-shadow: 0 -12px 8px -8px alpha(@accent_color_complimentary_alternate, 0.65), inset 0 -1px 4px @accent_color_complimentary_alternate;
outline: 0;
}
.white-key-normal:active {
background-image:linear-gradient(shade(@accent_color, 0.7), shade(@accent_color, 0.5));
box-shadow: 0 -12px 8px -8px alpha(@accent_color, 0.65), inset 0 -1px 4px @accent_color;
}
.white-key-active {
background-image:linear-gradient(shade(@accent_color, 0.7), shade(@accent_color, 0.5));
box-shadow: 0 -12px 8px -8px alpha(@accent_color, 0.65), inset 0 -1px 4px @accent_color;
outline: 0;
}
.black-key-normal {
background-image:linear-gradient(#444, #141414);
border: 2px solid #000;
Expand All @@ -417,18 +417,6 @@
.black-key-normal > *:focus {
background-color: rgba(0,0,0,0);
}
.black-key-normal:active{
background-image:linear-gradient(shade(@accent_color, 0.7), shade(@accent_color, 0.5));
box-shadow: 0 -14px 12px -6px alpha(@accent_color, 0.7), inset 0 -1px 4px @accent_color;
}
.black-key-active{
background-image:linear-gradient(shade(@accent_color, 0.7), shade(@accent_color, 0.5));
box-shadow: 0 -14px 12px -6px alpha(@accent_color, 0.7), inset 0 -1px 4px @accent_color;
}
.black-key-active-auto{
background-image:linear-gradient(shade(@accent_color_complimentary_alternate, 0.7), shade(@accent_color_complimentary_alternate, 0.5));
box-shadow: 0 -14px 12px -6px alpha(@accent_color_complimentary_alternate, 0.7), inset 0 -1px 4px @accent_color_complimentary_alternate;
}
.black-key-split {
background-image:linear-gradient(#444, #141414);
border: 2px solid #000;
Expand All @@ -442,6 +430,18 @@
background-image:linear-gradient(shade(@accent_color_complimentary, 0.7), shade(@accent_color_complimentary, 0.5));
box-shadow: 0 -14px 12px -6px alpha(@accent_color_complimentary, 0.7), inset 0 -1px 4px @accent_color_complimentary;
}
.black-key-active-auto{
background-image:linear-gradient(shade(@accent_color_complimentary_alternate, 0.7), shade(@accent_color_complimentary_alternate, 0.5));
box-shadow: 0 -14px 12px -6px alpha(@accent_color_complimentary_alternate, 0.7), inset 0 -1px 4px @accent_color_complimentary_alternate;
}
.black-key-normal:active{
background-image:linear-gradient(shade(@accent_color, 0.7), shade(@accent_color, 0.5));
box-shadow: 0 -14px 12px -6px alpha(@accent_color, 0.7), inset 0 -1px 4px @accent_color;
}
.black-key-active{
background-image:linear-gradient(shade(@accent_color, 0.7), shade(@accent_color, 0.5));
box-shadow: 0 -14px 12px -6px alpha(@accent_color, 0.7), inset 0 -1px 4px @accent_color;
}

.key_label_primary {
background: @accent_color;
Expand Down
24 changes: 0 additions & 24 deletions data/com.github.subhadeepjasu.ensembles.gschema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,40 +51,16 @@
<summary>Voice Right 1</summary>
<description>Main instrument (usually played with right hand if split)</description>
</key>
<key name="voice-r1-bank" type="i">
<default>0</default>
<summary>Voice Right 1</summary>
</key>
<key name="voice-r1-preset" type="i">
<default>0</default>
<summary>Voice Right 1</summary>
</key>
<key name="voice-r2-index" type="i">
<default>49</default>
<summary>Voice Right 2</summary>
<description>Instrument played along with main instrument on a layer</description>
</key>
<key name="voice-r2-bank" type="i">
<default>0</default>
<summary>Voice Right 2</summary>
</key>
<key name="voice-r2-preset" type="i">
<default>0</default>
<summary>Voice Right 2</summary>
</key>
<key name="voice-l-index" type="i">
<default>33</default>
<summary>Voice L</summary>
<description>Instrument played on the left side of keyboard split</description>
</key>
<key name="voice-l-bank" type="i">
<default>0</default>
<summary>Voice Left</summary>
</key>
<key name="voice-l-preset" type="i">
<default>0</default>
<summary>Voice Left</summary>
</key>
<key name="style-index" type="i">
<default>0</default>
<summary>Style</summary>
Expand Down
2 changes: 1 addition & 1 deletion po/POTFILES
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ src/Shell/Views/AppMenuView.vala
src/Shell/Views/BeatCounterView.vala
src/Shell/Views/ControlPanel.vala
src/Shell/Views/JoyStick.vala
src/Shell/Views/KeyboardView.vala
src/Shell/Views/KeyBed.vala
src/Shell/Views/RegistryView.vala
src/Shell/Views/SamplerPadView.vala
src/Shell/Views/SliderBoardView.vala
Expand Down
8 changes: 4 additions & 4 deletions po/com.github.subhadeepjasu.ensembles.pot
Original file line number Diff line number Diff line change
Expand Up @@ -404,19 +404,19 @@ msgstr ""
msgid "Y-Assign"
msgstr ""

#: src/Shell/Views/KeyboardView.vala:59
#: src/Shell/Views/KeyBed.vala:59
msgid "SUST"
msgstr ""

#: src/Shell/Views/KeyboardView.vala:60
#: src/Shell/Views/KeyBed.vala:60
msgid "STOP"
msgstr ""

#: src/Shell/Views/KeyboardView.vala:66
#: src/Shell/Views/KeyBed.vala:66
msgid "H O L D"
msgstr ""

#: src/Shell/Views/KeyboardView.vala:68
#: src/Shell/Views/KeyBed.vala:68
msgid "Z O O M"
msgstr ""

Expand Down
13 changes: 6 additions & 7 deletions src/Core/ArrangerCore.vala
Original file line number Diff line number Diff line change
Expand Up @@ -163,13 +163,13 @@ namespace Ensembles.Core {
if (key > Core.CentralBus.get_split_key ()) {
arpeggiator.send_notes (key, on, velocity);
} else {
synthesizer.send_notes_realtime (key, on, velocity, 17);
synthesizer.send_notes_realtime (key, on, velocity);
}
} else {
arpeggiator.send_notes (key, on, velocity);
}
} else {
synthesizer.send_notes_realtime (key, on, velocity, 17);
synthesizer.send_notes_realtime (key, on, velocity);
}
if (Application.settings.get_boolean ("harmonizer-on")) {
if (Application.settings.get_boolean ("accomp-on")) {
Expand All @@ -191,20 +191,19 @@ namespace Ensembles.Core {
if (key > Core.CentralBus.get_split_key ()) {
harmonizer.send_notes (key, on, velocity);
} else {
synthesizer.send_notes_realtime (key, on, velocity, 17);
synthesizer.send_notes_realtime (key, on, velocity);
}
} else {
synthesizer.send_notes_realtime (key, on, velocity, 17);
synthesizer.send_notes_realtime (key, on, velocity);
}
} else {
synthesizer.send_notes_realtime (key, on, velocity, 17);
synthesizer.send_notes_realtime (key, on, velocity);
}
});
arpeggiator.halt_notes.connect (synthesizer.halt_realtime);
harmonizer.generate_notes.connect ((key, on, velocity) => {
if (key > Core.CentralBus.get_split_key ()) {
synthesizer.send_notes_realtime (key, on, velocity, 17);
Application.main_window.main_keyboard.set_note_on (key, (on == 144), true);
synthesizer.send_notes_realtime (key, on, velocity);
}
});
harmonizer.halt_notes.connect (() => {
Expand Down
33 changes: 33 additions & 0 deletions src/Core/MidiRecorder/MidiEvent.vala
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
* Copyright 2020-2022 Subhadeep Jasu <[email protected]>
* SPDX-License-Identifier: GPL-3.0-or-later
*/

namespace Ensembles.Core {
public class MidiEvent {
public enum EventType {
NOTE,
CONTROL,
VOICECHANGE,
REVERB,
REVERBON,
CHORUS,
CHORUSON,
ACCOMP,
STYLECHANGE,
STYLECONTROL,
STYLECONTROLACTUAL,
STYLESTARTSTOP,
STYLECHORD,
TEMPO
}

public EventType event_type;
public uint8 track; // Which track this event belongs to
public int value1; // note value, voice number, style number, control number
public int value2; // note on
public uint8 channel;
public int velocity;
public ulong time_stamp;
}
}
Loading

0 comments on commit 07c6d97

Please sign in to comment.