-
Notifications
You must be signed in to change notification settings - Fork 312
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: VST版エディタをマージ #2521
base: project-vst
Are you sure you want to change the base?
feat: VST版エディタをマージ #2521
Conversation
[update snapshots]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
コードなるほどでした!!
ちょっとまだ大まかにしか読めてないのですが、一旦レビューコメントまで・・・!
let engineInfos; | ||
if (isElectron) { | ||
if (isElectron && isNode) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
特にVSTに関係ない変更ですかね?
変更自体は良さそう感!
でもいつの間にかmain側でこの辺が変わって、projectブランチがマージされるころにはこのコードを忘れていて、マージしてバグるということが起きそうかも。
mainにマージできると嬉しそう!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
特にVSTに関係ない変更ですかね?
- vst版のプラグインを差し込むためにvst/vstPlugin.tsが読まれる
- vstPlugin.tsはbrowser/contract.tsが依存にあるのでそれが読み込まれる
- browser/contract.tsの時限爆弾(この行)が爆発する
って感じでした。
mainにマージできると嬉しそう!
後でPRします。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
お これPR済みでしたらresolveお願いできると!
* trueが返されたらunwatchするwatch | ||
* "unwatch"が返されたらunwatchするwatch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
これもついでにmainに入れられると・・・!
(でも流石に変わらなそうなのでどっちでも良さそう)
Co-authored-by: Hiroshiba Kazuyuki <[email protected]> Co-authored-by: Hiroshiba <[email protected]>
GET_SINGING_VOICE: { | ||
action(_, { key }) { | ||
return singingVoiceCache.get(key); | ||
}, | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
キャッシュから取得なので、GET_SINGING_VOICE_FROM_CACHE
が良いかも。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ちょっと一旦ひとかたまりのコメントまで!
#2521 (comment)
...browserSandbox, | ||
async getAppInfos() { | ||
const appInfo = { | ||
name: await getProjectName(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ここプロジェクト名にしてる意図はなんでしょう 👀
(ブラウザと挙動合わせて良さそう、と思ってます)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Electron版の再現ですね。
あ、getProjectNameはCARGO_PKG_NAMEを取得する関数です。(紛らわしいので変えます)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
なるほど・・・・・・?
あれこれ、もしかしたらbackendへの実装要らないかもですね!!
VOICEVOX VST
と表示したい感じでしょうか。たぶんVST内なのは自明なので、VSTはむしろ無い方が良いかも。
スマホ版アプリタイトルに「スマホ版」とは書かなそうだなと。
これelectron側に実装あるのもVITEがなかった時代の名残というか、appからしか取れなかった時代の名残な気がするので、直でVITEから得れば良い気がする!!
ちょっとPR作ります!!
作っちゃいました!
#2538
logError(params.map(String).join(" ")); | ||
}, | ||
|
||
async getInitialProjectFilePath() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
コツですが、typeや他の実装と順番を合わせておいたほうが良いです。こういうとこが割れ窓になってくる。
順番違い見つけたら積極的に直しちゃってください!!
* VST版のSandBox実装 | ||
* ブラウザ版のSandBoxを継承している | ||
*/ | ||
export const api: Sandbox = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
あ~ここ順番ぐちゃぐちゃですね!
すみません、いったん並び替えお願いします!!
* ブラウザ版のSandBoxを継承している | ||
*/ | ||
export const api: Sandbox = { | ||
...browserSandbox, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
例えばgetAltPortInfos
辺りとかブラウザ版のを使ってますが、仮にブラウザ版側にブラウザ版専用の機能が実装されたらバグると思います!
その関数の挙動によっては致命的な問題になりえるはずです。
ちなみにこれをもうちょっと一般化すると、SOLID原則のOに反してると思います。(最近本で読んで理解しました)
Open-Closedの法則。ブラウザ版の影響範囲がブラウザ版でclosedじゃないので。
こんな感じで、今ブラウザと挙動が一緒でも、vstにとってどうあるべきかが大事なんですよね。
この関数群オブジェクトがどういう処理をするかだけ考えるのではなく、どの概念に使われて、どうあるべきなのかを考えると良いと思います。
...browserSandbox
をやめて、本当に共通化しても良さそうなとこはhoge() => {return browserSandbox.hoge()}
などとするのはどうでしょうか。
内容
自リポジトリのVST版エディタをマージします。
関連 Issue
スクリーンショット・動画など
(なし)
その他
(なし)