Skip to content

Commit

Permalink
music/ -> audio/
Browse files Browse the repository at this point in the history
  • Loading branch information
beggers committed Mar 9, 2024
1 parent 58a03aa commit 1d088b3
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 4 deletions.
7 changes: 5 additions & 2 deletions src/audio.js → src/audio/ambientchords.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import * as Tone from 'tone'

import { Chord, Interval, Note, Scale } from "tonal";
import { DefaultChordExplorer } from "./music/chordexplorer";
import { DefaultChordExplorer } from "./chordexplorer";

// TODO find a better way to do this. Probably need a button to be clicked
// on load?
addEventListener('mousemove', () => {
Tone.start()
})

export default class AmbientAudio {
class AmbientChords {
constructor() {
// TODO spend some time designing the pad for this on the OP-1 and
// replace this awful synth.
Expand Down Expand Up @@ -41,3 +41,6 @@ export default class AmbientAudio {
this.synth.triggerRelease(withBass, now + this.duration);
}
}

export { AmbientChords }
export default AmbientChords
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions src/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import { TrackballControls } from 'three/addons/controls/TrackballControls.js';
import { FontLoader } from 'three/examples/jsm/loaders/FontLoader.js'
import { TextGeometry } from 'three/examples/jsm/geometries/TextGeometry.js'

// import AmbientAudio from './audio'
// let a = new AmbientAudio()
// import * as ac from './audio/ambientchords'
// let a = new ac.AmbientChords()
// a.play()

const canvas = document.querySelector('canvas.webgl')
Expand Down

0 comments on commit 1d088b3

Please sign in to comment.