@@ -104,10 +104,10 @@ Data create(const Channel& o, int bufferSize, Resampler::Quality quality)
104104
105105/* -------------------------------------------------------------------------- */
106106
107- Channel deserializeChannel (const Patch::Channel& pch, ChannelShared& shared, float samplerateRatio, Wave* wave , std::vector<Plugin*> plugins)
107+ Channel deserializeChannel (const Patch::Channel& pch, ChannelShared& shared, float samplerateRatio, std::vector< Wave*> waves , std::vector<Plugin*> plugins)
108108{
109109 channelId_.set (pch.id );
110- return Channel (pch, shared, samplerateRatio, wave , plugins);
110+ return Channel (pch, shared, samplerateRatio, waves , plugins);
111111}
112112
113113/* -------------------------------------------------------------------------- */
@@ -129,7 +129,6 @@ const Patch::Channel serializeChannel(const Channel& c)
129129 pc.id = c.id ;
130130 pc.type = c.type ;
131131 pc.height = c.height ;
132- pc.name = c.getName (0 ); // TODO - scenes
133132 pc.key = c.key ;
134133 pc.mute = c.isMuted ();
135134 pc.solo = c.isSoloed ();
@@ -156,11 +155,14 @@ const Patch::Channel serializeChannel(const Channel& c)
156155 pc.midiOutLmute = c.midiLightning .mute .getValue ();
157156 pc.midiOutLsolo = c.midiLightning .solo .getValue ();
158157
158+ for (std::size_t i = 0 ; i < G_MAX_NUM_SCENES; i++)
159+ pc.names .push_back (c.getName (i));
160+
159161 if (c.type == ChannelType::SAMPLE)
160162 {
161- pc.waveId = c.sampleChannel ->getWaveId (0 );
163+ for (std::size_t i = 0 ; i < G_MAX_NUM_SCENES; i++)
164+ pc.samples .push_back ({c.sampleChannel ->getWaveId (i), c.sampleChannel ->getRange (i)});
162165 pc.mode = c.sampleChannel ->mode ;
163- pc.range = c.sampleChannel ->getRange (0 );
164166 pc.pitch = c.sampleChannel ->pitch ;
165167 pc.shift = c.sampleChannel ->shift ;
166168 pc.midiInVeloAsVol = c.sampleChannel ->velocityAsVol ;
0 commit comments