Create music directly in your browser with voice-to-instrument conversion and YAML-based scores!
Original Audio:
Processed Audio Banjo Instrument:
You have not uploaded any files yet.
Convert recorded voices into musical tones for unique sound generation.
Effortlessly write music using simple YAML syntax.
Generate stereo audio and export it as downloadable WAV files.
Use the following code snippets to quickly get started with PlayNoise.js:
<script src="pn-library.js"></script>
<script>
async function runPNExample() {
console.log(PN); // Debug the PN object
PN.instrument('thickbass'); // Choose an instrument
const song = await PN.singVoice('recording2.wav'); // Convert voice to music
console.log("Song created:", song);
setTimeout(() => {
PN.save(); // Save the audio as WAV after a delay
}, 8000);
}
runPNExample();
</script>
// Define song data
<script src="pn-library.js"></script>
<script>
length: 0.4
instrument: banjo
harmonic: first
volume: 5000
sections:
[
{
C1: [a4, c5, e5, 2:f5, 3:b4, a5, b5, g5, a5],
C2: [4:a3, b3, d4, f4, b4, 2:c5, 2:e4],
},
]
`;
const songData = jsyaml.load(yamlContent)
// Create and play the song
PN.instrument("banjo");
PN.setVolume(0.5); // Set volume level
const song = PN.createSong(songData); // Create a song from the input data
PN.save(song);
Explore the variety of instruments you can use with PlayNoise.js: