Skip to content

Commit

Permalink
fix(disks): added disk-synthesizer disk
Browse files Browse the repository at this point in the history
  • Loading branch information
ThornWalli committed Dec 8, 2024
1 parent d867cda commit e404072
Show file tree
Hide file tree
Showing 177 changed files with 427 additions and 372 deletions.
441 changes: 125 additions & 316 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions packages/app/src/components/Page.vue
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ const props = defineProps({
import('@web-workbench/disk-workbench13').then(
module => module?.default || module
),
synthesizer: () =>
import('@web-workbench/disk-synthesizer').then(
module => module?.default || module
),
moonCity: () =>
import('@web-workbench/disk-moon-city').then(
module => module?.default || module
Expand Down
7 changes: 6 additions & 1 deletion packages/core/components/Core.vue
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,12 @@ export default {
const sleep = (duration = 1000) =>
withWebDos ? 'SLEEP ' + duration : '';
const floppyDisks = ['workbench13', 'extras13', 'moonCity'];
const floppyDisks = [
'workbench13',
'extras13',
'synthesizer',
'moonCity'
];
lines.push(
sleep(1000),
Expand Down
12 changes: 0 additions & 12 deletions packages/disk-extras13/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ import { SYMBOL } from '@web-workbench/core/utils/symbols';

import basicDemos from './webBasic/basicDemos';

import synthesizerAction, {
CONFIG_DEFAULTS as CONFIG_DEFAULTS_SYNTHESIZER
} from './synthesizer';
import webPaintingAction, {
CONFIG_DEFAULTS as CONFIG_DEFAULTS_WEB_PAINT
} from './webPainting';
Expand All @@ -16,7 +13,6 @@ import webBasicAction, {
import base64ConverterAction from './tools/base64Converter';

export default ({ core }) => {
core.config.setDefaults(CONFIG_DEFAULTS_SYNTHESIZER);
core.config.setDefaults(CONFIG_DEFAULTS_WEB_PAINT);
core.config.setDefaults(CONFIG_DEFAULTS_WEB_BASIC);

Expand Down Expand Up @@ -50,14 +46,6 @@ export default ({ core }) => {
}
]
},
{
meta: [[ITEM_META.SYMBOL, SYMBOL.SYNTHESIZER]],
id: 'Synthesizer.app',
name: 'Synthesizer',
createdDate: new Date(2023, 8, 4).getTime(),
editedDate: new Date(2023, 8, 4).getTime(),
action: synthesizerAction(core)
},
{
meta: [[ITEM_META.SYMBOL, SYMBOL.WEB_PAINTING]],
id: 'WebPainting.app',
Expand Down
14 changes: 2 additions & 12 deletions packages/disk-extras13/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,6 @@
"private": true,
"main": "index.js",
"dependencies": {
"@js-basics/vector": "2.1.0",
"file-saver": "2.0.5",
"range-overlap": "1.0.0",
"rxjs": "7.8.1",
"tone": "15.0.4",
"uuid": "11.0.3",
"webmidi": "3.1.12"
},
"devDependencies": {
"dotenv-mono": "1.3.14",
"vite": "5.4.11"
"@js-basics/vector": "2.1.0"
}
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added packages/disk-moon-city/assets/img/ALT/city/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added packages/disk-moon-city/assets/img/ALT/city/3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added packages/disk-moon-city/assets/img/ALT/city/4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added packages/disk-moon-city/assets/img/ALT/mask.png
Binary file added packages/disk-moon-city/assets/img/ALT/weapon.png
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
6 changes: 1 addition & 5 deletions packages/disk-moon-city/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ export default async ({ core }) => {
type: 'markdown',
content: readmeContent,
position: { x: 50, y: 0 },
// fontFamily: FONT_FAMILES.Monospace['Courier New'],
fontSize: 16
},
meta: [
Expand All @@ -63,7 +62,7 @@ export default async ({ core }) => {
]
},
{
id: 'mooncity.app',
id: 'Mooncity.app',
name: 'Moon City',
meta: [
[ITEM_META.POSITION, { x: 0, y: 5 }],
Expand All @@ -85,9 +84,6 @@ export default async ({ core }) => {
borderless: true,
hideRootHeader: true
}
// layout: {
// size: ipoint(540, 360)
// }
},
{
full: true
Expand Down
File renamed without changes.
3 changes: 3 additions & 0 deletions packages/disk-synthesizer/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Synthesizer

File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import * as Tone from 'tone';
import { CONFIG_NAMES as CORE_CONFIG_NAMES } from '@web-workbench/core/classes/Core/utils';
import { getDecibelFromValue } from '../utils';
import TrackPlayer from '../classes/TrackPlayer';
import { CONFIG_NAMES } from '../index';
import { CONFIG_NAMES } from '../synthesizer';
import contextMenu from '../contextMenu';
import useTone from '../composables/useTone';
import Track from '../classes/Track';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,11 @@ import NoteDescription, {
Note as NoteDescriptionNote,
Time as NoteDescriptionTime
} from '../classes/NoteDescription';
import { getDefaultModel, getDefaultTrackModel, CONFIG_NAMES } from '../index';
import {
getDefaultModel,
getDefaultTrackModel,
CONFIG_NAMES
} from '../synthesizer';
import TrackPlayer from '../classes/TrackPlayer';
import contextMenu from '../contextMenu';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,11 @@ import MidiController from '../classes/MidiController';
import useTone from '../composables/useTone';
import NoteDescription from '../classes/NoteDescription';
import { getInstruments, getNoteTimes } from '../utils';
import { getDefaultModel, getDefaultTrackModel, CONFIG_NAMES } from '../index';
import {
getDefaultModel,
getDefaultTrackModel,
CONFIG_NAMES
} from '../synthesizer';
import contextMenu from '../contextMenu';
import TrackPlayer from '../classes/TrackPlayer';
import TimelineCanvas from './synthesizer/TimelineCanvas';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
getKeyboardSizes,
getNoteCount
} from './utils';
import { CONFIG_NAMES, renamingDialog } from './index';
import { CONFIG_NAMES, renamingDialog } from './synthesizer';

export default ({
core,
Expand Down
File renamed without changes.
54 changes: 54 additions & 0 deletions packages/disk-synthesizer/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
import { ITEM_META } from '@web-workbench/core/classes/FileSystem/Item';
import { SYMBOL } from '@web-workbench/core/utils/symbols';

export default async ({ core }) => {
const test = await import('./synthesizer.js');

console.log(test);
const [readmeContent] = (await Promise.all([import('./README.md?raw')])).map(
module => module.default || module
);

const {
default: synthesizerAction,
CONFIG_DEFAULTS: CONFIG_DEFAULTS_SYNTHESIZER
} = test;
core.config.setDefaults(CONFIG_DEFAULTS_SYNTHESIZER);

return {
meta: [
[ITEM_META.SYMBOL, SYMBOL.DISK_2],
// [ITEM_META.WINDOW_SYMBOL_REARRANGE, true],
[ITEM_META.VISIBLE, true]
],
name: 'Synthesizer',
items: [
{
id: 'Readme.md',
name: 'Readme',
data: {
type: 'markdown',
content: readmeContent,
fontSize: 16
},
meta: [
[ITEM_META.POSITION, { x: 90, y: 5 }],
[ITEM_META.IGNORE_SYMBOL_REARRANGE, true],
[ITEM_META.SYMBOL, SYMBOL.LARGE_NOTE_RICH]
]
},
{
id: 'Synthesizer.app',
name: 'Synthesizer',
meta: [
[ITEM_META.SYMBOL, SYMBOL.SYNTHESIZER],
[ITEM_META.POSITION, { x: 10, y: 5 }],
[ITEM_META.IGNORE_SYMBOL_REARRANGE, true]
],
createdDate: new Date(2023, 8, 4).getTime(),
editedDate: new Date(2023, 8, 4).getTime(),
action: synthesizerAction(core)
}
]
};
};
File renamed without changes.
24 changes: 24 additions & 0 deletions packages/disk-synthesizer/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"name": "@web-workbench/disk-synthesizer",
"version": "0.0.0",
"author": "Thorn-Welf Walli",
"contributors": [
{
"name": "Thorn-Welf Walli",
"email": "[email protected]"
}
],
"type": "module",
"license": "MIT",
"private": true,
"main": "index.js",
"dependencies": {
"@js-basics/vector": "2.1.0",
"file-saver": "2.0.5",
"range-overlap": "1.0.0",
"rxjs": "7.8.1",
"tone": "15.0.4",
"uuid": "11.0.3",
"webmidi": "3.1.12"
}
}
3 changes: 3 additions & 0 deletions packages/disk-synthesizer/svg/icons/double_next.svg
3 changes: 3 additions & 0 deletions packages/disk-synthesizer/svg/icons/double_prev.svg
3 changes: 3 additions & 0 deletions packages/disk-synthesizer/svg/icons/next.svg
3 changes: 3 additions & 0 deletions packages/disk-synthesizer/svg/icons/pause.svg
3 changes: 3 additions & 0 deletions packages/disk-synthesizer/svg/icons/play.svg
3 changes: 3 additions & 0 deletions packages/disk-synthesizer/svg/icons/prev.svg
3 changes: 3 additions & 0 deletions packages/disk-synthesizer/svg/icons/reset.svg
3 changes: 3 additions & 0 deletions packages/disk-synthesizer/svg/icons/skip_next.svg
3 changes: 3 additions & 0 deletions packages/disk-synthesizer/svg/icons/skip_prev.svg
3 changes: 3 additions & 0 deletions packages/disk-synthesizer/svg/icons/stop.svg
72 changes: 72 additions & 0 deletions packages/disk-synthesizer/svg/note.svg
Loading

0 comments on commit e404072

Please sign in to comment.