22// (c) 2019-2026
33// Licensed under LGPLv3 - http://www.gnu.org/licenses/lgpl-3.0.txt
44
5- package de .mossgrabers .convertwithmoss .format .akai .s3000 ;
5+ package de .mossgrabers .convertwithmoss .format .akai .s1000 ;
66
77import java .io .IOException ;
88
@@ -35,7 +35,8 @@ public class AkaiKeygroup
3535 // -50..50
3636 private byte envelope2ToFilter ;
3737
38- private final AkaiEnvelope [] envelopes = new AkaiEnvelope [2 ];
38+ private final AkaiEnvelope amplitudeEnvelope ;
39+ private final AkaiEnvelope auxEnvelope ;
3940
4041 // -50..50
4142 @ SuppressWarnings ("unused" )
@@ -87,8 +88,8 @@ public AkaiKeygroup (final AkaiDiskImage disk) throws IOException
8788 this .pressureToFilter = disk .readInt8 ();
8889 this .envelope2ToFilter = disk .readInt8 ();
8990
90- for ( int i = 0 ; i < 2 ; i ++)
91- this .envelopes [ i ] = new AkaiEnvelope (disk );
91+ this . amplitudeEnvelope = new AkaiEnvelope ( disk );
92+ this .auxEnvelope = new AkaiEnvelope (disk );
9293
9394 this .velocityToEnvelope2ToFilter = disk .readInt8 ();
9495 this .envelope2ToPitch = disk .readInt8 ();
@@ -105,9 +106,8 @@ public AkaiKeygroup (final AkaiDiskImage disk) throws IOException
105106 this .beatDetune = disk .readInt8 ();
106107 this .holdAttackUntilLoop = disk .readInt8 () != 0 ;
107108
108- // TODO check if this should be == 0!
109109 for (int i = 0 ; i < 4 ; i ++)
110- this .sampleKeyTracking [i ] = disk .readInt8 () ! = 0 ;
110+ this .sampleKeyTracking [i ] = disk .readInt8 () = = 0 ;
111111
112112 for (int i = 0 ; i < 4 ; i ++)
113113 this .sampleAuxOutOffset [i ] = disk .readInt8 ();
@@ -198,6 +198,28 @@ public byte getVelocityToFilter ()
198198 }
199199
200200
201+ /**
202+ * Get the amplitude envelope (envelope 1).
203+ *
204+ * @return The envelope
205+ */
206+ public AkaiEnvelope getAmplitudeEnvelope ()
207+ {
208+ return this .amplitudeEnvelope ;
209+ }
210+
211+
212+ /**
213+ * Get the auxiliary envelope (envelope 2) which might be used for filter cutoff or pitch.
214+ *
215+ * @return The envelope
216+ */
217+ public AkaiEnvelope getAuxEnvelope ()
218+ {
219+ return this .auxEnvelope ;
220+ }
221+
222+
201223 /**
202224 * The intensity of the 2nd envelope on the filter cutoff.
203225 *
0 commit comments