Skip to content

Commit 6d0e117

Browse files
committed
First stone of the frequency modulation
It is intended to set the common definitions to avoid later conflicts while merging the branches. A bug in the midi mapped codes parser has been fixed (the NOP wasn't properly identified).
1 parent 0668d60 commit 6d0e117

3 files changed

Lines changed: 45 additions & 35 deletions

File tree

README.commands

Lines changed: 34 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
This is the documentation of the commands.
22

3+
4+
Please note the frequency modulation is or is not available, depending which the branch has been fetch
5+
36
************************
47
THIS IS AN EARLY VERSION
58
************************
@@ -76,27 +79,35 @@ The step is about 0.79% or 0.395%, regardless the value.
7679

7780

7881

82+
NN No operation
83+
---------------
84+
midi= 0001 0010 0vvvvvvv c=N.A. midi note: A#0
85+
vvvvvv is every value except $1111111
86+
87+
This does not do anything. The value is not treated in the software but it is passed to the commands outputs.
88+
The purposes are:
89+
* Reserve some room for a manual edition of a binary file.
90+
* Make a kind of TTL or step display, especially with the -N 0 option of the output command
91+
92+
93+
7994
Abort
8095
-----
81-
midi= 0001 0010 0vvvvvvv c=N.A. midi note: A#0
96+
midi= 0001 0010 01111111 c=N.A. midi note: A#0
8297

8398
This input commands channel is discarded. If all of them are discarded or have reach an end of stream, the program quits.
8499
The main purpose is to run a partial scenario for test.
85100
The value is the time before leave (not yet implemented).
86101

87102

88103

89-
Reserved
90-
--------
91-
midi= 0001 0011 0------- c=N.A. midi note: A#0
92-
93-
94104

95-
AA, BA Modulation depth
105+
FA, AA, BA Modulation depth
96106
---------------------------------
97-
midi= 0001 010x 0vvvvvvv c=N.A.
98-
x=0 for the amplitude modulation midi note: G#0
99-
x=1 for the pulse modulation midi note: A0
107+
midi= 0001 0xxx 0vvvvvvv c=N.A.
108+
xxx=011 for the frequency modulation midi note: A#0
109+
xxx=100 for the amplitude modulation midi note: G#0
110+
xxx=101 for the pulse modulation midi note: A0
100111

101112
Set the depth from 0% if the value vvvvvvv is 0, to 100% if the value vvvvvvv is 127.
102113
The step is about 0.79%, regardless the value.
@@ -121,15 +132,11 @@ If it is 0, the modulation reduces its input according with the modulation depth
121132

122133

123134

124-
Reserved
125-
--------
126-
midi= 0001 0110 0000 1--- c=N.A. midi note: A#0
127-
128135

129-
130-
OP, BP, AP Relative phase shift
136+
FP, OP, BP, AP Relative phase shift
131137
--------------------------------
132138
midi= 0001 0110 00xx vvvv c=N.A. midi note: A#0
139+
xx=00 for the frequency modulation
133140
xx=01 for the base signal OP
134141
xx=10 for the pulse modulation BP
135142
xx=11 for the amplitude modulation AP
@@ -139,15 +146,10 @@ This should be used with caution as it breaks the assumption of this project to
139146

140147

141148

142-
Reserved
143-
--------
144-
midi= 0001 0110 0100 vvvv c=N.A. midi note: A#0
145-
146-
147-
148-
OO, BO, AO Absolute phase set
149+
FO, OO, BO, AO Absolute phase set
149150
-----------------------------
150151
midi= 0001 0110 01xx vvvv c=N.A. midi note: A#0
152+
xx=00 for the frequency modulation
151153
xx=01 for the base signal OP
152154
xx=10 for the pulse modulation BP
153155
xx=11 for the amplitude modulation AP
@@ -157,14 +159,16 @@ This should be used with caution as it breaks the assumption of this project to
157159

158160

159161

160-
NN No operation
161-
---------------
162-
midi= 0001 0111 0--- ---- c=N.A. midi note: B0
162+
FF frequency modulation
163+
-----------------------
164+
midi= 0001 0111 0vvvvvvv c=N.A. midi note: B0
163165

164-
This does not do anything. The value is not treated in the software but it is passed to the commands outputs.
165-
The purposes are:
166-
* Reserve some room for a manual edition of a binary file.
167-
* Make a kind of TTL or step display, especially with the -N 0 option of the output command
166+
Sets the fre'quency modulation frequency. It works (and is independent) with all the possible sampling rates.
167+
168+
TODO calculation formula.
169+
The maximum frequency is TODO
170+
The minimum frequency is TODO
171+
The step is TODO
168172

169173

170174

cpp_version/parameters.hxx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ struct signals_param_action
2424
{
2525
enum action_list { base_freq, base_phase_shift, base_phase_set,
2626
main_ampl_val, main_ampl_slewrate,
27+
freq_modul_freq, freq_modul_depth,
28+
freq_modul_phase_shift, freq_modul_phase_set,
2729
pulse_freq, pulse_depth, pulse_high_hold, pulse_low_hold,
2830
pulse_phase_shift, pulse_phase_set, pulse_modul_mode,
2931
ampl_modul_freq, ampl_modul_depth,

cpp_version/params_input_midi.cpp

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -206,9 +206,13 @@ void input_params_midi_2_action::midi_2_action_run(vector<signals_param_action>&
206206
action.value = long_value;
207207
break;
208208
case 0x02:
209-
// Abort
210-
ipm2a_status = input_event::end_track;
211-
ipm2a_clearing = input_params_base::c_abort;
209+
if ( action.value == 0x7f )
210+
action.action = signals_param_action::nop;
211+
else
212+
{
213+
ipm2a_status = input_event::end_track;
214+
ipm2a_clearing = input_params_base::c_abort;
215+
}
212216
break;
213217
case 0x04:
214218
long_value = get_value( 0, 1 );
@@ -252,8 +256,8 @@ void input_params_midi_2_action::midi_2_action_run(vector<signals_param_action>&
252256
}
253257
action.value &= 0x0f;
254258
break;
255-
case 0x03:
256-
action.action = signals_param_action::nop;
259+
case 0x07:
260+
// freq modulation TODO
257261
break;
258262
}
259263
break;

0 commit comments

Comments
 (0)