Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
initChordRNN(chordProgression) {
const modelCheckPoint = './checkpoints/chord_pitches_improv';
const model = new MusicRNN(modelCheckPoint);
model.initialize()
.then(() => {
console.log('initialized!');
return model.continueSequence(
presetMelodies['Twinkle'],
this.nOfBars * 16,
1.0,
chordProgression,
);
})
.then((i) => {
console.log(i);
this.setMelodies([i], chordProgression);
this.model = model;
this.setState({
loadingModel: false,
initRNN() {
const modelCheckPoint = './checkpoints/basic_rnn';
const model = new MusicRNN(modelCheckPoint);
model.initialize()
.then(() => {
console.log('initialized!');
return model.continueSequence(
presetMelodies['Twinkle'],
this.nOfBars * 16,
1.0)
})
.then((i) => {
this.setMelodies([i]);
this.model = model;
this.setState({
loadingModel: false,
});
this.sound.triggerSoundEffect(4);