Windows · Cogitsune Music 2.0 · Music-making guides

From your first note to your own music

Write a phrase, compose a whole song, draw notes, play a keyboard, or teach the built-in models your own music. These guides connect the concepts on the home page to practical steps in Cogitsune Music.

The controls described here are in the Windows desktop app, checked against the development build of . Some of them may not yet be in the version currently on the Microsoft Store. Related lesson links open the website's interactive tutorial library.

Looking for Score, Find notes, Transcribe, Scene, Spectrogram or Share Studio? Read the feature guides →

Browse the complete RAMAA tutorial library →

Write, hear, change

Live coding: make a phrase with commands

Code tab with a three-part phrase: Righthand melody, Lefthand chords and a sampler kick
Code tab with a prepared three-part phrase. Select the image to enlarge.

Code describes the notes and when they begin. play() starts a note; sleep() advances time before the next command. Change one value at a time to hear how pitch, duration and rhythm work together.

  1. Open the Code tab and enter the example below.
  2. Press ~Play or Ctrl+Enter to hear three notes. With nothing selected, playback starts from the line with the cursor; with lines selected, only those commands play.
  3. Change a pitch number, shorten a sleep(), or put the phrase inside loop(2) { ... }. Press Play again to hear the change.
tempo(120)
play(60, 1)
sleep(1)
play(62, 1)
sleep(1)
play(64, 1)
sleep(1)

Here, 60, 62 and 64 are C, D and E; you can also write note names such as C4. A duration of 1 is one beat. Two play() commands without a sleep() between them start together, making a chord, and diatonicChord() plays a whole chord from a scale. Named parts such as Lefthand { ... }, Righthand { ... } and Leftfoot { ... } run in parallel.

Every number can be an expression. Math functions such as sin, clamp and mod, and list generators such as list_euclid, list_cyclic and list_logistic, can turn formulas into melodies and rhythms.

~Play queues another block if a block is already playing. ~Stop clears waiting blocks and lets the current block finish; Stop! stops immediately. The + button opens Periodic Play to trigger your code every chosen number of beats.

Try the basic note lessons → · Reshape notes and get help with Assist → · Read the phrase as a score →

Choose the voice of your music

Built-in synths & reusable samples

Samples tab listing the WAV files that sampler() can play
Samples tab listing the WAV files that sampler() can play. Select the image to enlarge.

A plain play() uses a sine wave. Put commands inside wave_saw { ... }, wave_square { ... } or wave_triangle { ... } to try another waveform.

wave_triangle {
    play(60, 1, 0.01, 0.1, 90)
    sleep(1)
}

The arguments are pitch, duration, attack, fade and velocity. Attack controls how the sound begins, fade controls its ending, and velocity controls its strength. The built-in envelope uses Attack and Fade; keep both shorter than the note. Master Volume and Panning adjust each code window's overall level and stereo position.

Play WAV samples

  1. Open Samples. The list shows every file you can play, including the bundled drum kit and the epic and kagura percussion.
  2. Use Add Files... to add your own WAV files, and Go to Path to open the folder. Files live in %LOCALAPPDATA%\CogitsuneMusic\USER_DATA\Samples.
  3. Play a file from Code with sampler("beat_kick.wav"), using its actual filename without spaces. Add sleep() between hits to make a rhythm.

Explore attack, fade and velocity lessons → · Paint a new sample → · Use external instruments and effects →

Compose with rules

Algorithm: guide a generated phrase

Algorithm tab: phrase length, key and pitch-flow settings
Algorithm tab: phrase length, key and pitch-flow settings before generating. Select the image to enlarge.

The Algorithm tab combines random choices with musical constraints. You set the boundaries and shape; the app proposes notes that fit them. This workflow does not need a trained neural network.

  1. Set the phrase Length, BPM, key and pitch range.
  2. Shape Pitch Flow with the curve editor. Double-click to add points, drag to move them and right-click to remove them. Adjust Flexibility to control how far the melody may wander.
  3. Choose the allowed duration and sleep values, and shape velocity. Add constraints such as a limit on repeated pitches, a maximum leap or a final tonic note.
  4. Press Generate and inspect the notes. Use << Insert Code to add the result at the cursor, or << Replace Code to replace the editor's contents.
  5. Play the phrase, adjust your rules, and generate another idea.

Explore the algorithm lessons → · Refine the phrase with Effects and Shaper → · Compose a whole song →

Compose a whole song

Composer: a song from a preset or from words

Composer tab: the Algorithm Composer style circle after composing with the J-POP preset
Algorithm Composer: the style circle after composing with the J-POP preset. Select the image to enlarge.

The Composer tab writes a complete song: sections such as intro, verse and chorus, and the melody, chords, bass, drums and drone parts. It offers two ways to start.

  • Algorithm Composer uses the style circle, musical constraints and mathematical models. Presets such as J-POP, Jazz, Waltz, Lo-fi, City pop or Boss battle sit around the circle; a point between them blends their styles.
  • Neural Prompt reads a sentence with CogitsuneAgent, which plans the song, and writes the melodies with the Transformer. Prompts can be English, Japanese or Korean and can name a key, a tempo, a meter and a length, for example “calm jazz in D minor at 96 bpm, about 2 minutes”.
Composer tab in Neural Prompt mode with the section timeline of a song
Neural Prompt with the section timeline of the J-POP song composed before. No prompt was run for this capture. Select the image to enlarge.
  1. Choose Algorithm Composer and pick a preset or a point on the circle, or choose Neural Prompt and type what you want to hear.
  2. Press Generate & Play, or Generate to make the song without playing it. Another variation makes a new take.
  3. Read the timeline: Mute a section or Solo a part, change the Start position, and use Regenerate selection to redo part of the song.
  4. Press Apply to Code to write the song into the Code tab. Ctrl+Z in the editor brings your previous code back. Export DAW saves the song with a track for each part.
Code tab showing the song written by the Composer
The song in Code, with its prompt, planner, form, key and tempo in the header comments. Select the image to enlarge.

Markers keep a song's seed, settings and plan so that you can rebuild it later. With several code windows open, the Composer can split one song's parts across them.

A generated song is a starting point. Listen to each part, keep what you like, and edit the rest in Code, Score or Midi.

Open the Composer lessons → · Generate a single melody → · Export the song to a DAW →

Words to melody

Transformer & Style VAE: begin with a word

Transformer tab after generating a melody from the word calm
Transformer tab after typing “calm” and pressing Generate Melody with the bundled model. Select the image to enlarge.

The Transformer tab turns a word into a melody. A genre name such as jazz or waltz decides the style; other words decide the mood and tempo. The Transformer drafts the melody: the same words give the same draft, and Vary rolls another. With Style VAE on, that genre's VAE re-composes the draft by random sampling, so every press gives a new melody.

  1. Open Transformer. The bundled model is ready to use; Load... opens another model file.
  2. Type a word in Word, keep Style VAE checked, and press Generate Melody.
  3. Inspect the graph and the code preview, and press Listen to hear it without changing the editor.
  4. Use Insert to Editor or Insert & Play to transfer the result. Save your current Code first if you want to keep it: this transfer replaces the editor's contents.

Temperature, Top-K, Max Tokens and Retries adjust how the draft is written. Re-sample with the style VAE writes a new version of the current draft.

A generated melody is a starting point: listen, compare and edit it before adding it to your composition.

Explore the Transformer lessons → · Teach the model your own music →

Teach the models your music

Model Retrainer: examples, training and review

Model Retrainer with the bundled Transformer and its classical training examples open
Customize > Model Retrainer, Transformer tab: the bundled model and its classical training examples. Nothing was retrained. Select the image to enlarge.

Open Customize > Model Retrainer to see the examples behind the built-in models and to retrain them with your own music. Training writes a new model file; the bundled model stays unchanged.

Transformer: prompts and melodies

  1. Load the model file and open 2 Training data. Choose a genre to see its examples; each pairs a prompt with a melody and has mood and tempo labels.
  2. Select an example to read and play it, or edit its melody notes. Use Add new example... to import a .ktcd, .txt or .mid file, or paste MusicCode.
  3. Press Save training examples, then Confirm data and continue to train with all genres or one.
  4. Generate and review the result, then save it as a new model file and load it in the Transformer tab.

Style VAE: every genre and part

Style VAE tab with genre and part selectors and four bundled jazz melody examples
Style VAE tab: bundled jazz melody examples shown as piano rolls. Nothing was retrained. Select the image to enlarge.

Style VAEs work under the Transformer and the Composer's plan. Choose a Genre / style and a Part (Melody, Chords, Bass, Drums or Drone), listen to the bundled examples, add your own files and retrain. Compare before and after, then choose Use this version, or Use bundled to go back.

CogitsuneAgent: words and plans

CogitsuneAgent turns a prompt into the operation plan the Composer runs. Save training example in the Composer tab keeps a prompt and its plan; the CogitsuneAgent tab imports and reviews those examples before training.

Training takes time and depends on the examples you provide. Start with a few clear examples, keep notes about what you added, and compare the new model with the bundled one.

Explore the AI lessons → · Use the Transformer →

Edit notes on a grid

Piano roll: draw, move and refine notes

Midi tab: a Composer song imported into the piano roll
Midi tab with a Composer song imported into the piano roll. Select the image to enlarge.

Open Midi to work with notes visually. Start with an empty roll, or open Code / MIDI files... and choose >> Import From Code or >> Import From Midi File. Imported notes keep their parts: Main, Lefthand, Righthand, Tail, Leftfoot and Rightfoot.

  1. Select Pencil (2) and drag in an empty area to draw a note.
  2. Switch to Select (1). Drag a note to move it, its right edge to change its length, or empty space to select a group. Eraser (3) removes notes.
  3. Use Show part to edit one part at a time, Snap for grid-aligned edits and Quantize to align existing notes. Undo and Redo let you compare changes.
  4. Press Play or Space to hear exactly what you see. Choose a Wave or enable Plugin to use the instrument loaded in Plugins.
  5. Press Apply to Code to write the notes back, or use << Insert Code, << Replace Code and Export Midi >> in Code / MIDI files....

Ctrl + mouse wheel zooms the timeline. Ctrl+C and Ctrl+V copy notes, also to and from the Score and Find notes. Click a note or a key in the keyboard column to preview its pitch.

Try the piano-roll lessons → · Record from a keyboard → · Search the notes →

Play your ideas by hand

MIDI keyboard: monitor and record

  1. Connect a MIDI keyboard at any time and open Midi. The device list refreshes while the app runs.
  2. Open MIDI / sound..., select the device and press Device On. Live monitoring lets you hear the notes through the selected waveform or loaded plugin.
  3. Press the Record button to capture your playing in the piano roll. Recording overdubs: existing notes keep playing while new notes are added.
  4. Stop the take, review the notes, and use Quantize or manual edits to refine the timing. Apply the result to Code or export MIDI.

A MIDI recording stores note events. To keep the actual sound of your instrument or effects, make a WAV recording as well. No MIDI keyboard was connected for the screenshots on this site.

Open the MIDI lessons → · Edit your recorded notes → · Choose an export format →

Take your music further

Export: WAV, MIDI, MusicXML, PDF and DAW projects

Choose the result you need
FormatWhat you keepWhere
WAVRendered or recorded audio, including its sound.Wave Recorder → Rec / Save
MIDIEditable notes and timing, not the instrument's audio.Midi → Code / MIDI files... → Export Midi >>
DAWproject (.dawproject)A track for each part, with the sections kept as clips. Opens in Bitwig Studio, Studio One, Cubase and other DAWs that read the format.Code or Composer → Export DAW; Wave Recorder → Export All to DAW
LMMS (.mmp)The same tracks and sections for the free LMMS.Export DAW (choose the file type)
MusicXMLNotation for Dorico, MuseScore, Sibelius or Finale.Score → Export MusicXML...
PDFA printable score.Score → Export PDF...

Record a WAV

Wave Recorder with Rec, Save and Export All to DAW, idle
Wave Recorder, idle. Nothing was recorded. Select the image to enlarge.

In Wave Recorder, press Rec to start capturing audio and perform your music. Stop the recording, then press Save to export a .wav file. Add the saved sound to Samples if you want to play it again with sampler().

Export every window to a DAW

Export All to DAW writes the code of every window into one project: each window gets its own tracks. Choose .dawproject, .mmp or .musicxml in the save dialog.

Keep your editable source too: use .ktcd for Code or an Executor project (.ktpr) for every window. Exporting audio, MIDI or a DAW project does not replace saving your working project.

Follow the WAV recording lessons → · Save your editable project → · Export a score → · Make a video →