message: better type checking for sampler url parameters
diff: @@ -5,7 +5,7 @@ import { FrequencyClass } from "../core/type/Frequency";
  import { Frequency, Interval, MidiNote, NormalRange, Note, Time } from "../core/type/Units";
  import { optionsFromArguments } from "../core/util/Defaults";
  import { noOp } from "../core/util/Interface";
  -import { isArray, isNote, isNumber } from "../core/util/TypeCheck";
  +import { isArray, isNote, isNumber, isString } from "../core/util/TypeCheck";
  import { Instrument, InstrumentOptions } from "../instrument/Instrument";
  import { ToneBufferSource, ToneBufferSourceCurve } from "../source/buffer/BufferSource";
  @@ -91,14 +91,16 @@ export class Sampler extends Instrument<SamplerOptions> {
  const urlMap = {};
  Object.keys(options.urls).forEach((note) => {
  - this.assert(isNote(note) || (isNumber(note) && isFinite(note)), `url key is neither a note or midi pitch: ${note}`);
  + const noteNumber = parseInt(note, 10);
  + this.assert(isNote(note)
  + || (isNumber(noteNumber) && isFinite(noteNumber)), `url key is neither a note or midi pitch: ${note}`);
  if (isNote(note)) {
  // convert the note name to MIDI
  const mid = new FrequencyClass(this.context, note).toMidi();
  urlMap[mid] = options.urls[note];
  - } else if (isNumber(note) && isFinite(note)) {
  + } else if (isNumber(noteNumber) && isFinite(noteNumber)) {
  // otherwise if it's numbers assume it's midi
  - urlMap[parseInt(note, 10)] = options.urls[note];
  + urlMap[noteNumber] = options.urls[noteNumber];
  }
  });
  